How to move in a subform records

pacgoncalves

Registered User.
Local time
Today, 06:01
Joined
Jul 3, 2001
Messages
13
Hello
Example:
1 car have N pieces.
1 piece is in N cars.
I have 1 table for register the cars bilt. From the form of this table i must have to update the records Wheels = -4, windows =-4,... in the table MATERIAIS.
ex.
3 cars are made then in the field wheels = - (4 wheels) * 3(cars)...
I am using 4 tables in this, with this structure (the letter T is for Tables):
T_carsmade N - 1 T_CARS 1 - N T_carpieces N - 1 T_PIECES
This is the real structure in Access.
1. From the start : N cars are made in one day;1 car needs N pieces and 1 piece is in N cars.Ok!
2. I have a form (F_cars made) to register the number of cars that are made and to update the number of cars in stock (T_CARS)
3. In the form F_cars made i have a subform that makes the relation between the cars and the pieces. In the form i have the type of cars made and in the subform i have all the pieces that are need for that particular car.
4. My problem is: i have one botton that validates the number of cars made (prints a paper) in that day and to update all the fields in the subform but it only updates the first record ( for examp. the record of the windows...). In my code i'm looking first for the field that has the ID of the car and than the field with the ID of the piece. I need that it will pass to the second record and so.
Thanks anyone who can help on this.
 

Users who are viewing this thread

Back
Top Bottom