Hello, I am having difficulity deleting records based on a date. I am using Access 2003 and the following VBA code. I get no errors but the records fail to delete. In the 2 tables PDate is data type Date/Time. DeleteDate = 8/12/2008
VBA code:
Dim DeleteDate as Date
Path = "\\serverms001\Common\Production\Winding\Working\Master.mdb"
DoCmd.RunSQL "Delete * from ABS_Daily IN '" & Path & "' where PDate = " & DeleteDate
DoCmd.RunSQL "Delete * from Flex_Winder IN '" & Path & "' where PDate = " & DeleteDate
Thank you all.
VBA code:
Dim DeleteDate as Date
Path = "\\serverms001\Common\Production\Winding\Working\Master.mdb"
DoCmd.RunSQL "Delete * from ABS_Daily IN '" & Path & "' where PDate = " & DeleteDate
DoCmd.RunSQL "Delete * from Flex_Winder IN '" & Path & "' where PDate = " & DeleteDate
Thank you all.