run a delete query from a form

N

Number24

Is it possible to be able to run a delete query from a button on a form? When
I try to do this using a wizard, it does not list the delete query in the
query list?

TIA
 
F

fredg

Is it possible to be able to run a delete query from a button on a form? When
I try to do this using a wizard, it does not list the delete query in the
query list?

TIA

The syntax to run any query is:

DoCmd.OpenQuery "QueryName"

If you use the wizard, enter any query name.
Then open the button's code window and change the name to that of the
actual delete query name.
 
Top