Show error when time out is less than time in

J

Joy

HI. I have a form using Acces 2007 and we enter a time in and a time out
(and it is on the same day). Is there a way to make a error come up when
someone enters a time out that is before the time in?
 
A

Allen Browne

Open the table in design view.

Open the Properties box (View menu.)

Beside the Validation Rule in the Properties box, enter:
[time out] >= [time in]

If you don't want to force the user to enter both times, use:
([time out] >= [time in]) OR ([time out] Is Null) OR ([time in] Is Null)

Whatever error message you want displayed, type be in the Validation Text.

Be sure to use the validation rule in the Properties box, not the one in the
lower pane of table design (which is the rule for one field.)

If validation rules are new, here's an explanation of further examples:
http://allenbrowne.com/ValidationRule.html
 

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