Delete Records Based On Date Criteria (1 Viewer)

HeelNGville

Registered User.
Local time
Today, 07:21
Joined
Apr 13, 2004
Messages
71
I have a table that stores records by "return date". I would like to create a delete query that removes all records that fall outside of the date range entered on a specific form (frmMainMenu).

I can deleted the records that match the form criteria, however that is not what I need. The criteria used to delete the records was:

Between [Forms]![frmMainMenu]![from date] And [Forms]![frmMainMenu]![to date]

Let's say that the frmMainMenu contain the date range of 8/1/05 to 8/10/05, however the table contained data from 6/1/05-8/14/05, I would like for the query to delete all records that have a date 6/1/05-07/31/05 and 08/11/05-08/14/05.

Any assistance would be greatly appreciated. Thanks in advance for your help![/SIZE]
 

ejstefl

Registered User.
Local time
Today, 13:21
Joined
Jan 28, 2002
Messages
378
add a NOT before your between statement.

NOT Between [Forms]![frmMainMenu]![from date] And [Forms]![frmMainMenu]![to date]
 

Users who are viewing this thread

Top Bottom