error message

  • Thread starter Thread starter michael goodall
  • Start date Start date
M

michael goodall

i am trying to add data to a form and a subform that are related, when
i try to click into the first field of the subform it says that i
cannot "add or change a record because a related record is required in
the table location"(which is my subform). i am trying to fill in the
related information in the table location when this message appears.
can anyone help me?
i know that this request is not too clear, but if you prefer i can send
you a copy of my database.
 
Michael,

It looks like your relationship is defined backwards. A normal error
would be that the related record is required in the main form's table.
Is the data unique in the main form's table? If so, make sure the 1 in
the relationship diagram is on the side.

You might try entering data directly in the tables for testing purposes
to make sure the tables are OK before you try working with the form.

The easiest way to manage the data in the mainform/subform is to set
the Link Child Fields and Link Master Fields in the properties of the
subform object to be the name of the key field. Then you don't even
have to display the field in the subform.

Jerry
 

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

Back
Top