Subform generating multiple records

Jason Dundas

Registered User.
Local time
, 20:17
Joined
Jan 23, 2015
Messages
17
I have a Sales Order form that is used to input sales orders. the main form is comprised of customer and shipping information that is created from a query based on a customerOrder table while the subform is comprised of product information that is created from a query based mainly on the CustomerOrderDetail table.

I need to be able to put multiple products in the subform as a customer can order many items, when I save and close the form I look in the customer order table and see only one record for that sales order while seeing all the records in the detail table for all the products ordered for that sales order as I should but the problem I run into is the query that I have for the sales order shows multiple records for every product that was ordered on that sales order and shows up multiple times in my sales order maintenance form when I only want to see the one. if I change the query to a total query that fixes that problem and only see one copy of the sales order but makes the forms un updateable which is no good.

I cant figure out what I did to make this happen as I have a purchase order form that is setup the same but doesn't have this problem and works great, no matter how many items I have in the subform I only see one purchase order in the query and in the maintenance form.

any help would be great
 
Please don't take this the wrong way, but if I asked you

'I have a house - how do I know which door I need to open to get into the kitchen?'

You would have difficulty in giving an answer beyond something like 'try the back door'. Or you have to ask more questions about the house - what floor is the kitchen on, does it have a window etc.

The same applies to your question, if you are happy with a 'back door' type answer, then I suggest 'try checking your query and the tables'.

If you need a more constructive answer, since you think the query is wrong, post the sql to your query.:)
 
nope didn't take it the wrong way, it was a dumb question.....long day.....I figured it out once I took a step back and had a break, I just needed to Check my query as you said ...anyway all is well disregard this post
 

Users who are viewing this thread

Back
Top Bottom