Subform Issue

G

Guest

frmMain has a combo box linked to a "Info" command button
that access form frmParent. This combo box draws it's
values from the primary key "Unit" in the table used in
frmParent. This is a one-to-many relationship.

Within fParent is subform sfrmDaughter.

fParent and sfrmDaughter are related by sfrmDaughter's
primary key "Name"(one-to-many).

When a value is selected in frmMain's combo box and
the "Info" command button is clicked, a popup appears
that states "Enter Parameter Value - sfrmDaughter.unit"

Since "Unit" is not a field in sfrmDaughter, but is only
related by frmParent, I get confused.

If I leave the text box empty, and click OK, everything
works normally. If I hit Cancel, sfrmDaughter is removed
from frmParent and an empty white space appears where the
subform is supposed to be.

There are no null values in any of the tables.

How can I get that popup to stop? I would truly
apprecite the help.
 
J

John Vinson

frmMain has a combo box linked to a "Info" command button
that access form frmParent. This combo box draws it's
values from the primary key "Unit" in the table used in
frmParent. This is a one-to-many relationship.

Within fParent is subform sfrmDaughter.
ok...

fParent and sfrmDaughter are related by sfrmDaughter's
primary key "Name"(one-to-many).

But if sfrmDaughter's PRIMARY KEY is the linking field it cannot
possibly be a one to many relationship. At best it's a one to one,
since the Primary Key is by definition unique.
When a value is selected in frmMain's combo box and
the "Info" command button is clicked, a popup appears
that states "Enter Parameter Value - sfrmDaughter.unit"

What are the Master/Child Link Fields of sfrmDaughter? Could you post
the code of the Click event? Do you get this message if you open
frmParent directly?
Since "Unit" is not a field in sfrmDaughter, but is only
related by frmParent, I get confused.

Somewhere - I don't know where - in your code, or more likely in the
Query upon which one of the forms is based, you have a reference to
[sfrmDaughter].[Unit]; since Access can't find it either it's asking
for it. Check the queries (and perhaps the RowSource queries of any
combo boxes on frmParent and sfrmDaughter as well).
 

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