delete statement

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.
 
B

bob

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top