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

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

Guest

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.
 
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
 

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

Back
Top