Debug - Delete data in Table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I tried to run the following code so widely suggested but I get a "Run-time
error '424': Object required" message box. I'm a newbie so let me know what
I'm doing wrong


Function DeleteDataFromDatabase()

Current.Db.Execute "DELETE * FROM tblDraftConversionTable", dbFailOnError

End Function

Los Man
 
I figured it out:

Function DeleteDataFromDatabase()

CurrentDb.Execute "DELETE * FROM tblDraftConversionTable", dbFailOnError

End Function

CurrentDb.Execute, not Current.Db.Execute.

I'm going to go insane,
Los Man
 

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

Back
Top