I have a piece of VBA which deletes a row from a linked table based on the data in the name column being 'John'...
CurrentDb.Execute "DELETE FROM TABLE WHERE NAME = 'John'"
This works fine but I now want to delete records with name = 'John' and where the date column is a specific date...
CurrentDb.Execute "DELETE FROM TABLE WHERE DATE_REPORTED = #01/07/2009 12:00:00# AND NAME = 'John'"
There is a record with the date and name 01/07/2009 12:00:00 and John but it doesnt seem to delete.
Must be something wrong with the way I am using the date?
Please Help.