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

Delete query based on dates 1

Status
Not open for further replies.

NWTrust

Technical User
Apr 2, 2002
68
GB
I have a delete query which has a field "Date Purchased". On my form frmDeleteByDate I have a box "Date" formatted as Medium Date.
In the query in the "Date Purchased" column I have <[forms]![frmDeleteByDate]![Date] the object being to delete all records with a date less than the date entered.
If I run the query direct and enter a date when requested the required records are deleted but if I enter the required date into frmDeleteByDate and call the query all records are deleted.
Any help would be greatly appreciated.

NWTrust
 
Can you post the query that you are running?

I would expect that it is something like
Code:
DELETE * FROM SomeTable

WHERE [Date Purchased] < [forms]![frmDeleteByDate]![Date]
 
Thanks, Golom. You are correct regarding the query but I'm afraid a closer look revealed a typing error. On correcting this the query now works fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top