Back again...

  • Thread starter Thread starter Aaron Howe
  • Start date Start date
A

Aaron Howe

I seem to be getting a really stupid error message up and
I don't know why. I have two forms, one main and one
sub. In the main form a record is selected using a combo
box, and then information to be added to that record can
be entered in the subform below. Because the information
is in two different tables, subforms were used with one
field from the combo box selection being copied into the
subform in order to maintain a link through the PK.

However, when I go to make a selection from the combo box
in the subform, I get an error message that a value is
required in the field and that I must fill it in - which
is what I am about to do, because the error comes up the
moment I click on the combo box control!

Any ideas why this would happen?
 
Aaron

If you have a mainform/subform design, you shouldn't have to copy a value
into the subform. Check the Parent & Child properties of the subform
control. Access will keep the two connected, and will automatically
generate a "foreign key" value in the subform.

This assumes that your underlying table structure includes a foreign key
field in your child table, pointing back to the primary key field in your
parent table.

Or have I misunderstood? If you forget the forms for a second, do you even
have parent and child tables, related one-to-many? Use of a
mainform/subform design is usually predicated on having a one-to-many data
relationship.
 
Back
Top