| Ö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
|