How can I "group by" and edit a value

capsula4

Registered User.
Local time
Today, 04:55
Joined
Jan 3, 2008
Messages
122
Hello!

I have 1-many relationship:

tblMain: Invoice, Date

tblProducts: ProdID, Invoice, Product, PriceProduct, Packaging, PricePackaging

Okay, the deal is that all of the fields are being filled with info except PricePackaging which is being filled at the end of the month.

PricePackaging is a monthly value which depends on "Packaging", in other words, I tried making a query like this:

M: Month(Date), Packaging, PricePackaging
Group by M and Packaging

I could make it, but I cannot modify PricePackaging. I actually guess Group By would never allow me modify a query but how can I make this work so as not copy and paste the same values? That is a really heavy task on my db since its really big. :)

Thanks a LOT in advance!
 
Okay so I make the query

"M: Month(Date), Packaging, PricePackaging" without grouping by...

But how do I make the subform?? I mean,
"Month" would be the main form
and "Packaging, PricePackaging" the subform, but how do I organize it this way? Should I make more than one qry?

Maybe

"M: Month(Date), Packaging" and "Packaging, PricePackaging" queries, and join em with subforms?
 
The entire main table (Select * from tblMain) would be the main form and the tblProducts would be the subform (Select * from tblProducts).

I say that very simply but your problem is actually deeper than that. I fear that your design is not truly correct when it comes to the tables, but I don't have time to go deeper. Take a look at the Northwind Database that ships with Microsoft Access and see how they have things set up.
 

Users who are viewing this thread

Back
Top Bottom