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

Automatically add a field from a form to a field in a subform when 1

Status
Not open for further replies.

Aludra

Programmer
Mar 17, 2001
1
US
Newbie to Access here...
So far I've avoided basic in all its forms, including the visual, but I find myself having to do some stuff with Access.
I've got a form with a master record and a sub-form displaying detail records, 1 to M relationship. I'm not displaying the linking field on the subform. When I want to add a record to the detail table table, I want to capture the key field from the master table and insert it automatically into the link field on the detail table. Any way of doing this? I appreciate the assistance.
 
How are you currently synching the main and sub forms?

In the properties of the subform control (on the main form)
there should be Link Child Fields, and Link Master Fields.

From memory if you use those to synch the main and subforms, and insert a new record in the subform without assigning a value to the link field, it will use the value of the linked field from the main form (I think) Ben
+61 403 395 052
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top