that damn date time picker control

  • Thread starter Thread starter Jared Evans
  • Start date Start date
J

Jared Evans

Hey all.

Ok i would like some quick help (possibly even by MSN (e-mail address removed))

basically i have 2 date time picker controls on an Access Form. It's a data
entry form.
the 1st datepicker is for checking in, and the 2nd for checking out.
Someone can't check out before checking in. Now I thought it would be easy
to disable/invisibilise the checkout datepicker till the checkin datepicker
was activated, but apprently this isn't so.

anyone have any advice or an alternative to the datetimepicker control
(don't say txtbox, its my last resort).

Cheers

Jared Evans
 
Assuming this form is bound to a table or query, use the BeforeUpdate event
procedure of the *form* to block the save if the dates are wrong.

Example:

Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.[CheckOut] < Me.[CheckIn] Then
Cancel = True
MsgBox "You can't check out before you check in!"
End If
End Sub
 
Back
Top