Updating the subform linking field

K

k7i5t3n

Have a problem:

When I start to enter data on my main form, it doesn't update the
foreign key field in the subform, so when I get to the subform to enter
information, it's not linked and says there's no related parent record.
Any suggestions? Thanks!
 
R

Rick Brandt

k7i5t3n said:
Have a problem:

When I start to enter data on my main form, it doesn't update the
foreign key field in the subform, so when I get to the subform to
enter information, it's not linked and says there's no related parent
record. Any suggestions? Thanks!

Did you set the MasterLink and ChildLink properties of the subform control?
That is what controls that.

You are meaning a subform where one form is embedded inside another one right?
If you are opening the other for separately then it is not a subform and will
not have that behavior unless you do some additional modifications.
 
K

k7i5t3n

Yes, I've set the Master and Child properties and am opening the form
with the subform embedded in it. For some reason, when I type the info
into the main form, the subform child field doesn't update to be the
same as the master field, so when I tab into the subform field, it gets
confused, can't match it up and won't save the data in the subform. ??
Thanks,
 
K

k7i5t3n

Yes, I've set the Master and Child properties and am opening the form
with the subform embedded in it. For some reason, when I type the info
into the main form, the subform child field doesn't update to be the
same as the master field, so when I tab into the subform field, it gets
confused, can't match it up and won't save the data in the subform. ??
Thanks,
 
K

k7i5t3n

By the way, this is just a problem when I'm trying to enter a new
record into the form. When I scroll through old records, it matches up
just fine.
 
R

Rick Brandt

k7i5t3n said:
Yes, I've set the Master and Child properties and am opening the form
with the subform embedded in it. For some reason, when I type the info
into the main form, the subform child field doesn't update to be the
same as the master field, so when I tab into the subform field, it
gets confused, can't match it up and won't save the data in the
subform. ?? Thanks,

Post *exactly* what you have entered in the two properties.

Is the MasterLink referring to a field or control?

If a control, is it a ComboBox? ComboBoxes often display one value while
containing another which might confuse things.

Are any of the fields built as Lookup fields in the table?
 
K

k7i5t3n

Yet again, you've helped me out tremendously. Thanks Rick! Same problem
as last time - I was referring to the field name, not the control name.
I appreciate all your help!!
 

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