Run query from a command button in a form - pls help!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My form runs off of one parameter query but I wanted the results to show in a
list box and 2 graphs on the form. Right now, I have to enter the parameter
for the list box, then reenter the parameter for chart 1 then reenter again
for chart 2, all the same query. Is there some way to run it just once (
enter the parameter ) and all 3 objects will update in the form? thanks in
advance
 
Create a new Form "frmParam" with a TextBox for the user to enter the
required value and a CommandButton to open your Form (with graphs).
Use the reference to the TextBox on frmParam as the Parameter in your Query.

When you want to use your Form, open the frmParam first, enter the param
value then use the CommandButton to open your Form. In this case, Access
will repeatly grab the value from the TextBox.
 
Excellent! How do I reference the textbox inmy query, can you give me an
example. Im still quite new to access, Im not too sure how to set up the
command button to open the form. Just wondering, is there a way to do all
this with my original form open or does it have to go from form to form.
Thanks in advance.
 
Back
Top