Hi, I'm glad to find you
I created a db in access 2010 where I insert the daily production(knitwear), so I have the fallowing tables: [Articles] with the fields Article (primary key) and Ncycle(this is the number of cycle to be done to a certain article); [Orders] with the fields : IDOrder (primary key), Date, Article, Quantity, hours to do
[daily production] with the fields: Date, Article, Cycle, Quantity, IDOrder. The relation sheep [Orders].[IdOrder] one to many with [daily production].[IDOrder]; [Articles].[Article] one to many with [orders].[Article].
I created a query of calculation where I drew the tables: Articles, Orders, daily production, with the fields [Date] and [Article] from table [daily production], and I made the following formula: production made:[daily production].[Quantity]/[Article].[Ncycle]; production still to be done:[Orders].[Quantity]-[production made]
done hours: ([production made]*[orders].[hours to do])/[Orders].[Quantity]; hours still to be done:[Orders].[hours to do]-[done hours].
and the query does all calculations, BUT if I have 400 clothes to do,every day the query have to subtract the quantity already made (ex: 10.05.13 made quantity 50, remaining : 350 (400-50), 11.05.13 made quantity 60, remaining: 290 (350 -60)), but the query does not doing this calculation, every day starts do substract to begin: 11.05.13, remaining 340 (400-60), the same thing with the hours.
There is a VBA code do do this?
Please help me
thank you