M
movie_lover2001
Guest
Hi,
I have a form with 1 subform in it. These are created to enter new records in the subform. When the user selects a record in the main form and tries to create a new record in the subform, I want to read the primary key value of main form into the foreign key field of the subform. I have tried:
Me![subformforeignkey].value = [forms]![mainform]![primarykeyfield]
but it gave me an error that it can't find the main form which is not true because the main form is open with subform with in. Please help....
[This message has been edited by movie_lover2001 (edited 04-14-2002).]
[This message has been edited by movie_lover2001 (edited 04-14-2002).]
[This message has been edited by movie_lover2001 (edited 04-14-2002).]
I have a form with 1 subform in it. These are created to enter new records in the subform. When the user selects a record in the main form and tries to create a new record in the subform, I want to read the primary key value of main form into the foreign key field of the subform. I have tried:
Me![subformforeignkey].value = [forms]![mainform]![primarykeyfield]
but it gave me an error that it can't find the main form which is not true because the main form is open with subform with in. Please help....
[This message has been edited by movie_lover2001 (edited 04-14-2002).]
[This message has been edited by movie_lover2001 (edited 04-14-2002).]
[This message has been edited by movie_lover2001 (edited 04-14-2002).]