Date comparison..Need Help....

  • Thread starter Thread starter asiandoll
  • Start date Start date
A

asiandoll

Guest
I don't know if I should post this here but I'll try and do it..

I am stuck with one problem with my Access 2000 Database that I'm creating. I have a textbox called ExpectedDate. If a date is placed in the text box and is the same date as today, I want a messge box saying "Today is the Day". How will I be able to do that.

Please help me write the code for me .. Thanx in advance.
 
In the AfterUpdate event of your textbox(ExpectedDate) put the following code...

private sub ExpectedDate_AfterUpdate()

if me!ExpectedDate = date then msgbox("Today is the Day!")

end sub

This one line will take care of this situation for you. Hope that helps.

Doug
 
Thank you so much... It works like a charm
 

Users who are viewing this thread

Back
Top Bottom