Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert records in a "one to many" relationship table form 2

Status
Not open for further replies.

miguelst

MIS
Jan 6, 2005
13
CA
Good morning,
Yesterday I sent a question, but I think I was not very clear. I’ll try to explain better my difficulty.
I created with the wizard a Form with a SubForm, for 2 tables with a relationship "one to many".
When I insert one record in the main form, I would like to insert automatically several records in the subform. Is it possible?
 
yes, but not through the wizzard.

you would have to write some code to do the inserts.

--------------------
Procrastinate Now!
 
Could you explain please. maybe some clues about those lines of code?
 
Tip: in the AfterInsert event procedure of the main form use some DoCmd.RunSQL "INSERT INTO ..." or play with the subform's Recordset.AddNew method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top