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

Populating two fields, different tables

Status
Not open for further replies.

Syerston

Programmer
Jun 2, 2001
142
GB
The problem!!! Two tables linked by a reference field (the primary key on the first table).

The reference is keyed into a text box on a form where the control source is the primary key on the first table. I would like the reference field on the second table to be populated automatically with this value.

Any help greatly appreciated
 
Hi :)

Try this

On the control source of 2nd text box write

DLookup(" [2ndTable]![RefrenceField] ", "2ndTable", " [2ndTable]![LinkField]= Forms!MyForm!1stTextBox"

Hope u'll understand that :)

Cheers!
Aqif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top