For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic Enterprise > September 2005 > dtPicker









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author dtPicker
Ömer Ayzan

2005-09-29, 7:58 am

Dear friends,
I have one mask edit box (mebFicheDate) and one date time picker
(dtpFicheDate, updown false). Masked edit box is used to enter date data.
whenever a user enters date dtpicker is set to
the date that is entered into masked edit box or vice versa.
I wrote the following code to make both controls in sync. but when first
dropped dtpicker calendar shows the prior date even thou its text portion is
already updated to the value in the masked edit box. Any sugestions
appreciated

Ömer Ayzan

Private Sub dtpFicheDate_Change()
mebFicheDate = dtpFicheDate.Value
End Sub

Private Sub mebFicheDate_LostFocus()
Dim strDate As String
strDate = mebFicheDate
If StrComp(strDate, "__.__.____", vbTextCompare) <> 0 Then
With dtpFicheDate
.Value = strDate
.Refresh
End With
End If
End Sub



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com