that damn date time picker control

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
 
A

Allen Browne

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top