3 ' linked ' queries to display in a form

G

Guest

How do I run all 3 queries one after the other with one click of a command
button which pulls data from the same table but select different columns to
display in different parts of the form: example:

Table1 has these columns: Symbol High Low Close Volume Date

1. 1st query selects all the above columns to display in list box 1 ( or
combo box1? ) where your search criteria is by symbol eg. XYZ ( mine is set
up as a parameter query )
2. 2nd query selects close and date only for symbol XYZ and displays it in
chart 1
3. 3rd query selects volume and date only for symbol XYZ and displays it in
chart 2


Im really struggling with the design, suggestions and how to code my form to
do this would be appreciated.
 
J

John Vinson

How do I run all 3 queries one after the other with one click of a command
button which pulls data from the same table but select different columns to
display in different parts of the form: example:

It is not necessary to "run" queries to do this. An Action Query (like
an Append Query or an Update Query) needs to be executed, or run; a
select query where you just want to display data can be used as the
Recordsource of a form or a subform. It's neither necessary nor
appropriate to run it.
Table1 has these columns: Symbol High Low Close Volume Date

1. 1st query selects all the above columns to display in list box 1 ( or
combo box1? ) where your search criteria is by symbol eg. XYZ ( mine is set
up as a parameter query )

Simply set the Row Source property of the listbox to the stored
parameter query. Ideally the parameter should reference a control on
the form itself - e.g. =[Forms]![YourFormName]![cboTicker]

Ditto for the other two.

John W. Vinson[MVP]
 
G

Guest

Thats the stuff, it works great now. Thanks!

John Vinson said:
How do I run all 3 queries one after the other with one click of a command
button which pulls data from the same table but select different columns to
display in different parts of the form: example:

It is not necessary to "run" queries to do this. An Action Query (like
an Append Query or an Update Query) needs to be executed, or run; a
select query where you just want to display data can be used as the
Recordsource of a form or a subform. It's neither necessary nor
appropriate to run it.
Table1 has these columns: Symbol High Low Close Volume Date

1. 1st query selects all the above columns to display in list box 1 ( or
combo box1? ) where your search criteria is by symbol eg. XYZ ( mine is set
up as a parameter query )

Simply set the Row Source property of the listbox to the stored
parameter query. Ideally the parameter should reference a control on
the form itself - e.g. =[Forms]![YourFormName]![cboTicker]

Ditto for the other two.

John W. Vinson[MVP]
 

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