Check for date in field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to have a message box pop up if someone enters a termination
date in a field. I'm not sure which event to use. WOuld it be BEFORE UPDATE
for the form? I'm having the most trouble with the expression. I've tried to
create a conditional macro, but with no luck. The field is TERMINATION DATE.

To check for a null seems much easier.
 
I would like to have a message box pop up if someone enters a termination
date in a field.

I'm not quite sure what you mean here by "a termination date." Could you
explain that a bit more?
I'm not sure which event to use. WOuld it be BEFORE UPDATE
for the form? I'm having the most trouble with the expression. I've tried
to
create a conditional macro, but with no luck.

The BeforeUpdate event of the form is probably the best place for what you
need.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Big List: www.ltcomputerdesigns.com/JCReferences.html
 
How about adding it to the AfterUpdate event of the termination date field.
Then any value added would prompt a message. If you do not need an Ok/Cancel
button, then you can to the message like:

MsgBox "You have entered a termination date"

Hope this helps.
 
It depends on when you want the message to appear, and why. Is it an
information only message, or does it require the user to make a choice? The
form's Before Update event should work, or the control's Before Update event
if you want the information to appear as soon as the user enters data in the
field and tries to move to another control. What code have you tried?
 
Back
Top