Help me with this code. I have a simple database in VB using dao. I want to
allow the user to ender a date in a text box and then press a command button
to have the program delete all the records that have a date in the date
filed of that table older than the date in the text box. No matter how I try
to format it i always get a syntax error. here's the code.
I've tried double " or single'. If I try " I get Expected :List seprator or)
Help!
pdate = Text1.Text
Dim Dog As Database, cat As Recordset
Set Dog = DBEngine.Workspaces(0).OpenDatabase _
("C:\lockck\lockck.mdb"
Dog.Execute ("DELETE from lockck WHERE [date]< #'& pdate&'# "
allow the user to ender a date in a text box and then press a command button
to have the program delete all the records that have a date in the date
filed of that table older than the date in the text box. No matter how I try
to format it i always get a syntax error. here's the code.
I've tried double " or single'. If I try " I get Expected :List seprator or)
Help!
pdate = Text1.Text
Dim Dog As Database, cat As Recordset
Set Dog = DBEngine.Workspaces(0).OpenDatabase _
("C:\lockck\lockck.mdb"
Dog.Execute ("DELETE from lockck WHERE [date]< #'& pdate&'# "