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

keeping ID of referring record and automatically storing in a field

Status
Not open for further replies.

cynaptic

Programmer
Sep 13, 2001
54
GB
is it possible to keep the unique ID of a record in a form when a sub form is called via command button and then insert automatically the original unique ID from the referring form in the table that populates the subform when an addition is made.

sounds complicated, probably coz I am not explaining it very well.

I have a form which shows company details. I have a subform which shows notes about each company (linked on CompanyName). When I open the suform there are no notes to see (no records yet) but should I wish to add a record - how do I automatically insert the CompanyName field into the CompanyNotes Table without forcing the user to select from a combo or type in the company name?

I hope this makes sense - I am starting to confuse myself.

caffeine treatment STAT!!
 
If both the company form and the company notes form are bound forms, and you specify the "link fields" in the subform property correctly, the company name should be inserted into the new record in the company note table automatically when you enter this record in the subform.

Seaport
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top