Delete Query Button on a form

G

Guest

Hi,

I have a delete query and want to place a button on a form to run it. When I
create a button in design and run the wizard my delete query does not appear
in the queries window.

How would I create the button other than in the wizard.

Thanx
 
G

Guest

In design view, select the button, click on properties, select the Events
tab, put your cursor on the On Click event box. Click the button to the
right with three dots. Select code builder. Enter this code:

CurrentDb.Execute("Your query name goes here"), dbFailOnError
 
G

Guest

Thanx, But it does not work..



Klatuu said:
In design view, select the button, click on properties, select the Events
tab, put your cursor on the On Click event box. Click the button to the
right with three dots. Select code builder. Enter this code:

CurrentDb.Execute("Your query name goes here"), dbFailOnError
 
G

Guest

Why not?
Post your code and what errors you are getting.
We can't help if we don't know what the problem is.
 
G

Guest

Got better advice on the query page, thanx.

Create a macro.... easy simple and effective, plus it works 1st time.

Accesscrazy
 
G

Guest

Glad you got your problem resolved. Maybe you got better advice because you
gave a better description of the problem.
 
G

Guest

Actually i gave less info...

Klatuu said:
Glad you got your problem resolved. Maybe you got better advice because you
gave a better description of the problem.
 
G

Guest

What I originally sent does work, if you do it correctly.
Those of us who participate here do it voluntarily in an effort to help
others and, in turn, when we hit a problem, have a place to go for
assistance. If you choose to ask for help, give very little information on
the problem, and then be rude to the people trying to help, I think many of
use will remember your name and ignore your posts.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top