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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting a Field into Multiple Tables

Status
Not open for further replies.

chloe67

Technical User
Mar 1, 2005
7
CA
Hi all,
I am relatively new to creating Access databases and VBA, so please bear with me.

I have a main form with 5 subforms within it. The names are shown below.
Main Form:
FRMProjectInfo

Sub-forms:
TBLAsBuiltReports subform
TBLDrafting subform
TBLMicrostation subform
TBLProjects subform
TBLRecording subform

Each of the subforms are linked to the ProjectNumber text field from the main form. What I would like for it to do is once somebody enters a project number into the FRMProjectInfo main form, is for this project number to automatically be inserted into each of the subforms corresponding tables. Is this possible? Any and all information would be greatly appreciated (I've been fiddling around with this for the past two days).
 
Have you set up link child and master fields for the subform controls?

You may wish to look at the Northwind sample database that ships with every version of Access. It has some good example.
 
I believe that I set up the link child and master fields in the subform controls when I created the subforms, but what I am finding is that unless you enter in data into each of the forms, a record is not created in the tables. Did I perhaps do something wrong?

 
I did not read your post closely enough. You can save the main record and then run a series of insert queries to add a record to the relevant subform tables. Would this suit?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top