Passing data through list box

oskar_diaz

Registered User.
Local time
Today, 00:03
Joined
Jul 28, 2003
Messages
18
I have not been able to solve this problem. I have a main form all it has is 3 buttons and a drop down list.

how do i make it so that when i click on the name the child form will open in add mode.

Right now i have it set up so that it goes to the records that are housed with in its table. but when i go to new record and i try to save it tells me that

"cannot add record because a related record is required in tbl_Names"


anyone

thanks
 
In the BeforeInsert event of the child form, you need to populate the foreign key. Access does this automatically when the child form is a subform, but not when it is a main form.

Me.txtSomeKeyField = Forms!frmOtherForm!txtSomeKeyField
 

Users who are viewing this thread

Back
Top Bottom