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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get and check dates in Access

Status
Not open for further replies.

spearssc

Technical User
Jun 10, 2002
4
US
HI,
I have the need to do a bulk delete where I have to check records in an Access DB against the current date. If the record is one year or older based on the current date it is deleted. The date is currently stored as 10-Jul-05. I want to call a SQL statement to do the date check and delete based on the date the user enters in a textbox. I'm using Access 2000. I know I need to get the current date but I don't know how in Access. I know Acess uses VBA but i 'm not sure how to incorporate SQL that way.

Thanks in advance for your assistance with this matter.

Each One Teach One for the advancement of the "CRAFT"!
 
To get the current date simply use the Date() function either in SQL or VBA.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top