Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

Trying to copy a record with a subform

I have a form, recordsource = tblPricingGrid,  that also has a sub-form, recordsource = tblPricingGridDetail.  It looks like this:

User generated image
The top part (light blue) is the main form and the bottom part is a continuous form that the user can enter prices into.  There are always going to be 42 rows in the subform.

My challenge is to use the [Add Record] button to add a new record to the table tblPricingGrid, AND copy just the left hand column in the sub-form to 42 new records in tblPricingGridDetail so that the new record will then appear to the user to enter prices.

The link between the main form and the subform is PricingGridID so the main table gets that next number because it is an autonumber PK field.  But then that autogenerated number needs to be populated into the tblPricingGridDetail in 42 records.

I sure hope this makes sense.  Its a little difficult to explain.
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SteveL13

ASKER

Very helpful.  Thanks.