delete statement

  • Thread starter Thread starter Douglas J. Steele
  • Start date Start date
D

Douglas J. Steele

You can't just put SQL statements into VBA code like that. You have to
execute the SQL, either using the DoCmd.RunSQL statement or (better) the
Execute method of the Database object. Another option is to use the Command
object in ADO.
 
I am creating some records in a table and then I want to
clean that up before next time. Can someone tell me what
am I doing wrong here? I am wanting to delete all the
records from the table.

I am using the following code but it states that there is
a mistake with ....

Private Sub cmd_Deletetemp_Click()
DELETE from tempattendance;'ERRORexpecting end of statement
End Sub
 
Back
Top