I need the code to remove all entries from a databse with a date attached over 365 dys.
It needs to remove all entries based on 2 fields.
The fields are "status' & "Duespaid"
The table is tbldata
I can remove them based on one parameter, eg:
strSQL = "delete * from tblData where status is "archived'"
DoCmd.RunSQL strSQL
I know this is wrong, but it give the idea of what I need to do & I can't get the syntax right
strSQL = "delete * from tblAData where status='Remove'" _
& " WHERE Date > Duespaid.value + 365"
DoCmd.RunSQL strSQL
DoCmd.ShowAllRecords
DoCmd.RunSQL strSQL
Paul Beddows
Consulting, Avaya/EAS implementation, Training
Vancouver, Canada
E-mail paul at natcoa.com
It needs to remove all entries based on 2 fields.
The fields are "status' & "Duespaid"
The table is tbldata
I can remove them based on one parameter, eg:
strSQL = "delete * from tblData where status is "archived'"
DoCmd.RunSQL strSQL
I know this is wrong, but it give the idea of what I need to do & I can't get the syntax right
strSQL = "delete * from tblAData where status='Remove'" _
& " WHERE Date > Duespaid.value + 365"
DoCmd.RunSQL strSQL
DoCmd.ShowAllRecords
DoCmd.RunSQL strSQL
Paul Beddows
Consulting, Avaya/EAS implementation, Training
Vancouver, Canada
E-mail paul at natcoa.com