Delete ALL data in 3 tables

  • Thread starter Thread starter Kevbro7189
  • Start date Start date
K

Kevbro7189

I have a D-Base with 6 tables, 3 of which (tables A B C) I want the user to
be able to delete all the information in. I want this to be to be done using
a button on a form.

I'm new to Delete Queries and I'm not sure what I'm doing. Should I use a
Macro, Event procedure, or what?

Please help
 
Kevbro7189 said:
I have a D-Base with 6 tables, 3 of which (tables A B C) I want the
user to be able to delete all the information in. I want this to be
to be done using a button on a form.

I'm new to Delete Queries and I'm not sure what I'm doing. Should I
use a Macro, Event procedure, or what?

Please help

Code behind the button...

Dim db as Database
Set db = CurrentDB

db.Execute "DELETE * FROM A", dbFailOnError
db.Execute "DELETE * FROM B", dbFailOnError
db.Execute "DELETE * FROM C", dbFailOnError

Set db = Nothing
 
Thanks it works.


Rick Brandt said:
Code behind the button...

Dim db as Database
Set db = CurrentDB

db.Execute "DELETE * FROM A", dbFailOnError
db.Execute "DELETE * FROM B", dbFailOnError
db.Execute "DELETE * FROM C", dbFailOnError

Set db = Nothing
 
Back
Top