FK ID's not Populating

  • Thread starter flipper1067 via AccessMonster.com
  • Start date
F

flipper1067 via AccessMonster.com

I have a form that has a FK in it but it isn't populating. When I go into
frmApplication and click in children subform on the command button ""Answer
Child Questions". It opens another form that I try to put in a response to
the first question. It won't let you move on to the next question because
there is no value for ChildID. I could type the ChildID in, but of course, I
want them to autopopulate instead. I tried to put in the following in the
default value for the ChildID text box in frmChildQResponses: [Forms]!
[frmApplication]![sfmChildren].[Form].[ChildID]

Can anyone help me link these two forms or figure out what I am doing wrong?
Thanks.
 
A

Albert D.Kallal

Normally, we use a sub-form, and set the link master/child settings.
It opens another form

Ok, so, you are launching a separate form?

I am confused here. Are we talking about a sub-form, or launching a separate
form?

If using a sub-form, use the link child/master settings in the form design
mode...you will NOT need to write any code if you do this

If you are using a separate form, then

Use the forms before-insert event

me!ChildID = forms!NameOFForm!NameOfPrimaryKeyField
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top