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

inserting values into more than one table in a form

Status
Not open for further replies.

brian30

Technical User
Mar 3, 2001
5
CA
Not sure what's the best way to go but my subform has 4 tables (on pages) and each of these tables has a 1 to 1 relationship with the table on the mainform(which has 2 tables on it). it would be great if i could, when entering the value in the main form(on the table in particular, call it A), that all 4 related tables are updated with that value (i.e. tables B,C,D,E). table A and tables B,C,D,E are related by this very field that i want updated (i.e. inserting a value into the primary key field of the subform tables based on the primary key value of the mainform table).

does this make any sense? should i use an alternate schema?

thanks
 
Brian,
You may want to investigate why your relationships are one to one. If this is the case you may only require one table. Taken as it is, as example, perhaps you want only one note for one order (if any) being the reasoning for your schema: On each of your subforms, include the related field either hidden or visible. Working thru the main form, get your properties for your "IDField" on one of your sub forms. Go to the data tab and select "default value". Click to the right on the ellipse "..." button to open the builder. Now use the builder to find your main forms "IDField". set this as your default value. You may leave this visible for a few tests, then when you're confident the values are updating, hide 'em! Gord
ghubbell@total.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top