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

Entering records using a sub form 1

Status
Not open for further replies.

RichyT

Technical User
Jun 11, 2002
20
GB
I have created a sub form that is linked to a form via a button. When the button is pressed, the sub form displays all records from table2 that are linked to the record selected in the main form from table1. However, I wish to use this to input any new records, and when you try to input a new record, the foreign key in table2 (table1's primary key) does not automaticaly set to equal the same as the record from the main form. I do not want the user to input (or even see) the foreign key, can anyone help.

Cheers
Rich
 
Rich:

It will take some vb coding. Pass the primary key to the opened form using OpenArgs.

In the On Current event of the opened form assign the OpenArgs value to the appropriate field.

Hope this helps. Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top