HOW TO SET A DATE FIELD WITH CURRENT DATE TO SHOW A WARNING MESSA.

D

deepu

sir,

I would like to know, how to set a warning message with a current date.

For eg: if my ID Card is expiring today I need to see a message box with a
warning message that "Your ID Card expires today.

Kindly help me.
 
S

Steve Schapel

Deepu,

You would need to identify a suitable event to use for checking the
data. For example, you could use the Open event of a form which is
always open when the application is open, so this might be good if the
application is opened every day. Anyway, then you could use code
something like this...
If DCount("*","YourTable","[YourDateField]=" & Date)>0 Then
MsgBox "Your ID Card expires today."
End If
 
Top