View Full Version : newbe needs help. it's an easy one.


steev
11-02-2001, 01:00 PM
Hello.
I have a Delete Query named UsedUp. It works fine.
I want to run UsedUp with an On_Click event procedure in a form.
How do I code that? Do I need to use SQL statements? If so, what are they.
I would appreciate any help on the matter.

jwindon
11-02-2001, 02:16 PM
Use the wizard to create a command button that runs that query. That is all.

The code reads:

DoCmd.OpenQuery "UsedUp"

PS If you want to "turn off" those "You are about to...." messages add the following to the code before and after the query runs like so. (The wizard throws in error handling code, use it)

DoCmd.SetWarnings = False
DoCmd.OpenQuery "UsedUp"
DoCmd.SetWarnings = True


[This message has been edited by jwindon (edited 11-02-2001).]