Message Box

D

Dave

I need a message box that will warn the user if a date
field is left blank for more that a given amount of time
Example If a record is created on a certain date lets
say 01/14/2004 and a date in not entered into another
date field on the same record within 90 days Example
Showing the date an order was filled I would like the
warning box to say "the order is over 90 days old and has
not been filled.
Thanks Dave
 
W

Wayne Morgan

The form's Current event fires whenever you go to a record. In the form's
Current event, check the value of both textboxes and if the second one is
blank, check the date difference and pop-up a message box if needed.

Example:
If Not IsDate(Me.txt2ndTextbox) Then
If DateDiff("d", Me.txt1stTextbox, Date)>= 90 Then
MsgBox "The order is overdue!", vbOkOnly + vbExclamation, "Overdue
Order"
End If
End If
 

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