I ma having trouble with the DB execute statement.
i am trying to delete data from a table that is over thirty days old. Curerntly i am using the code:
Dim DeleteDate As Date
DeleteDate = Format(Date - 30, "DD/MM/YYYY")
CurrentDb.Execute "DELETE * FROM tblCustomerMeeting WHERE MeetingDate<" & DeleteDate & ";", dbFailOnError
The table field is set to a short date. statement seems only to delete some of the data but not all for example if i have date of #04/03/2003# in my table it will; not be deleted
Am i going about deleteing data from a table in the right way? Is there a better way i could be doing this
Thanks
Chris
i am trying to delete data from a table that is over thirty days old. Curerntly i am using the code:
Dim DeleteDate As Date
DeleteDate = Format(Date - 30, "DD/MM/YYYY")
CurrentDb.Execute "DELETE * FROM tblCustomerMeeting WHERE MeetingDate<" & DeleteDate & ";", dbFailOnError
The table field is set to a short date. statement seems only to delete some of the data but not all for example if i have date of #04/03/2003# in my table it will; not be deleted
Am i going about deleteing data from a table in the right way? Is there a better way i could be doing this
Thanks
Chris