Debug - Delete data in Table

L

Los Man

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
 
L

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
 
Top