Querying every result from a queried combo box.......possible?

G

Guest

Quite a tricky one to explain here, but let me attempt it.

I have a form which contains 4 combo boxes and a sub form. The first 3 combo
boxes are used to select various parameters. The 4th combo box displays a
list of order numbers which are generated by a query which uses the first 3
combo boxes parameters to generate the results.

The sub form at the bottom of the page displays more details based on
whichever order number is selected from the 4th combo box. Still with me?

I want the bottom sub form to actually display all results for all the
results in the 4th combo box?

Does that make sense? I'll explain a bit more thoroughly.
The form is used to query an orders database, the first three parameters are
customer, our point of contact and customers order number. The user would
select one or all of the three parameters to then see a list of all order
numbers equal to the set parameters. The sub form then displays all the items
pertaining to the order number selected from the queried list in combo box 4.
I want the sub from to display the items for every order number in the 4th
combo box and not just the selected order number.

Hope that makes sense....
 
J

Jeff Boyce

Richard

You stated:
The sub form at the bottom of the page displays more details based on
whichever order number is selected from the 4th combo box.
And:

I want the bottom sub form to actually display all results for all the
results in the 4th combo box?

Does that make sense?

No, it doesn't. Either the subform displays all the records matching the
top three criteria, or it displays the record matching the selected item in
combo box 4. I don't see how it could do both..
 
G

Guest

Jeff, the 4th Combo box contains a list of order numbers generated by any,
all or none of the three above parameter combo boxes. I.e. if no query
parameters are set, then every single order number is appears in the 4th
combo box.

The sub form, shows the details pertaining to the current selected order
number in the 4th combo box. What I actually want the sub form to do is list
all details for every order number that the 4th combo contains (generated by
the choices made in the first three) and not just the single selected order
number.

Any clearer? It's kind of tricky to explain but simple when you see it.
 
J

Jeff Boyce

Richard

So, it sounds like you're saying you want the subform to have the same
"source" as the 4th combo box.

Instead of using a parameter pointing to the 4th combo box in the query that
"feeds" the subform, why not just use the same query that feeds the 4th
combo box?

Or have I missed something?
 
G

Guest

Jeff I feel foolish now!

This was most definitely a case of me not being able to see the wood for the
trees!

That solution was far too obvious for me to see!

What happened, was I originally made the form so the results were displayed
in the 4th combo box and you simply pressed a button to see the current
selected view. The sub form was a 'bolted on' idea that my boss suggested
afterwards.

Thanks Jeff, it's much appreciated and sometimes it takes someone else to
make you see the obvious!
 

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