'Group By' query problem

martinhough

Registered User.
Local time
Today, 11:14
Joined
Feb 2, 2011
Messages
16
I have a form which uses a 'Group By' query on a given field. This works fine by compiling seperate orders (all from the same company and at the same time by the same person) but does not allow a user to input (I have a drop down box to select whether the order has been placed or not, which in turn adds the date and pre-fix of the order). This worked fine before I made it a Totals query and I am thinking it must be that I can't update a grouped record on a single row?

Is there a way around this does anyone know?

Thanks
 
Yes, you are correct, a query that includes Group By is immediately non-updatable. What you would need to do is to remove that grouping and have to enter the data individually. So, that would mean if there isn't supposed to be one of those for every record it should be in another table which is in a level above. So, by that I mean something like this:

Orders Table
OrderID (PK)
OrderDate
CustomerID
Shipped
OrderPrefix


OrderDetails Table
OrderDetailID (PK)
OrderID (FK)
ProductID
ItemCost

etc.

So only those fields that have to have data for each row of the order details appear in it and those that apply to the order as a whole appear in the orders table.
 
Many thanks Bob
 

Users who are viewing this thread

Back
Top Bottom