Auto run query from formu

John thomas

Registered User.
Local time
Today, 08:49
Joined
Sep 4, 2012
Messages
206
I currently run my query by inserting my orderID and run it
I need to automate this
With my orders form open I need a button that runs my query with the order I'd that is open
 
You may get some ideas from Martin Green's site
There are several examples and topics.
 
Hi jdraw
Thanks for your help
That is a really useful site
However it does not answer my current dilema
I just need a button to press that takes the id from from the currently open form
And uses that I'd to run the query
Or auto fills a parameter box with the id
 
Hi jdraw
Thanks for your help
That is a really useful site
However it does not answer my current dilema
I just need a button to press that takes the id from from the currently open form
And uses that I'd to run the query
Or auto fills a parameter box with the id

I've had a look at the site and it clearly addresses your issues. Granted, it doesn't answer your query (no pun intended) directly but the answers are there.

1. Create a query include reference to your OrderID (as per the sites instructions).
2. Add a command button on your form
3. Code in button : DoCmd.OpenQuery "name of query", bla, bla, bla (you'll have to look it up - haven't got Access handy)

So, clicking the button will run the query restricting the result set to the OrderID of your open form.

Steve.
 
I currently run my query by inserting my orderID and run it
I need to automate this
With my orders form open I need a button that runs my query with the order I'd that is open

I thought the OP was asking about automation. Martin Green's page addresses a parameter query. I could be wrong but isn't the OP using a similar technique to Green's already?

Most likely not and that is why he is asking. It appears to me that he is manually entering an ID number in a parameter box but wants to click a button and have it done automatically.
 
Hi all many thanks for your answers
I will try all sugestions and let you know
 

Users who are viewing this thread

Back
Top Bottom