deleting all the records in a table

suthaharmca

New member
Local time
Tomorrow, 00:56
Joined
Dec 27, 2007
Messages
2
Hi,
I am using Vb6.0 as a front end and msaccess as the db.
i want 2 delete all the records in a table "Register" by clicking a menu
The connection is made using ADODB
Till now i hv the code

Private Sub mnudel_Click()
Docmd.SetWarnings False
Docmd.RunSql ("DELETE * FROM Register;")
Docmd.SetWarnings True
End Sub

But when i execute this a error msg displays
Run time error "424"
Object required

Whats the problem in me
plz help me to come out from this...
 
Make sure you have the proper references set in VB6 for ADO.
 
Try this

DoCmd.RunSQL "DELETE * FROM Register;", -1

Chris B
 

Users who are viewing this thread

Back
Top Bottom