Expression to notify you of date expiry

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

Guest

Please help!!

I have a field in one of my forms where you enter the expiry date of a
passport. I need to create an expression that opens a msgbox notifying the
user that the passport has less than 6 months validity i.e. that from Today's
date there is either exactly 6months or less left on the passport.

I haven't a clue so any help would be greatly appreciated!!!! :)
 
Julia UK said:
Please help!!

I have a field in one of my forms where you enter the expiry date of a
passport. I need to create an expression that opens a msgbox notifying the
user that the passport has less than 6 months validity i.e. that from
Today's
date there is either exactly 6months or less left on the passport.

I haven't a clue so any help would be greatly appreciated!!!! :)

Something like this in the form's current event should get you started:

If DateDiff("m", Date, Me.txtDate1) < 6 Then
MsgBox "Whatever"
End If

Where txtDate1 is the name of your text box.

Keith.
www.keithwilby.com
 
Back
Top