Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set date to false after 3 months 1

Status
Not open for further replies.

hdat44

Technical User
Aug 15, 2002
50
GB
Hi i have a date field in my form and i want the date to be false after a 3 month period has expired i have tried the code below but the incorrect date just populates the field

If Date ,DateAdd("m",-3,Now()) Then
Date.Value=False
End If

Any help please??
 
False isn't valid as a date value.
Did you mean null (blank)?

John
 
Yes, Brilliant it worked thank you very much for your help!!
 
Aother tip - replace Now() with Date() (to eliminate the time part of your code) and it will speed up a bit, unless the time component is needed for your program.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top