Displaying query results in a subform

jonesda

Registered User.
Local time
Today, 02:06
Joined
Sep 13, 2005
Messages
36
Hi,

This is a Query / Forms question...

I have 2 tables setup with a 1 to many relationship, simialr to 1 Customer having 1 or more orders. I created a query to prompt for all orders for a particular customer. I then created a form based on this query - i.e. linked the query to a form.

Now when I open the form I am prompted for the customer id and when I enter this all of the results of the query are displayed in 1 form. However, this is not what I want. I would like the orders for the customer to be displayed within a subform on the actual form. In this way the customer details will static and I can cycle through the customer orders in the subform separately.

Is there any way I can setup my query to display the results in this way? I need the prompt for the customer ID. Or is there any way I can setup the form to display the results in the above way?

Any help would be greatly appreciated.

Thanks
 
think i've had the same problem before ,

basically i'd have the main form linked to the table of customers and then the subform based on the query ....

to do this you'll need to create both forms individuall save them and then when you insert the subform into the main form the wizard asks you what you want to link the records with , select the relevent id e.g. customer_ID and that should allow you to scroll through your customers and have the subform to change with each customer ....

let me know if that helps !
 
Thanks arobbo,

Got it to work in a way similar to how you described it. But I used 2 different queries and selected them both onto the same form. The wizard then asked how I would like to link them. Initially I just had 1 query (with a join between 2 tables) selecting my data.

Thanks for your help.
 

Users who are viewing this thread

Back
Top Bottom