G
GLT
Hi,
I am trying to create a delete query that deletes records older than a
specific date, the date is entered by a field on a form by the user. All
records prior to the date the user enters are removed.
Within that query, the date and time is part of the primary key field, so I
need to extract the date from the primary key field first.
I tried to build this query in the design grid, and when I try to execute
it, it says its too complex to be evaluated.
SELECT tbl01_FullCompare.RecID,
Format(Left((Right([RecID],14)),8),"dd/mm/yyyy") AS Dte
FROM tbl01_FullCompare
WHERE
(((Format(Left((Right([RecID],14)),8),"dd/mm/yyyy"))<[forms]![frm01_DeleteOldData]![fldDateLimit]));
Can anyone advise how to get this working?
Any assistance is greatly appreciated...
Cheers.
I am trying to create a delete query that deletes records older than a
specific date, the date is entered by a field on a form by the user. All
records prior to the date the user enters are removed.
Within that query, the date and time is part of the primary key field, so I
need to extract the date from the primary key field first.
I tried to build this query in the design grid, and when I try to execute
it, it says its too complex to be evaluated.
SELECT tbl01_FullCompare.RecID,
Format(Left((Right([RecID],14)),8),"dd/mm/yyyy") AS Dte
FROM tbl01_FullCompare
WHERE
(((Format(Left((Right([RecID],14)),8),"dd/mm/yyyy"))<[forms]![frm01_DeleteOldData]![fldDateLimit]));
Can anyone advise how to get this working?
Any assistance is greatly appreciated...
Cheers.