Message Box

  • Thread starter Thread starter Dave
  • Start date Start date
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
 
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
 
Back
Top