Cannot add or change a record because related record is required

G

Guest

I have a form that works perfectly for adding new records to two different,
related tables called "Projects" and "summarytasks". However, when I use that
form as a subform to a form called "AddNewObjects" it appears to not work.

When I try to add a new object I WANT to assign that object to an
appropriate project and subtask. When I try to do so, I get the error message
"You cannot add or change a record because a related record is required in
table 'Projects'.

Any ideas?
 
J

John Vinson

I have a form that works perfectly for adding new records to two different,
related tables called "Projects" and "summarytasks". However, when I use that
form as a subform to a form called "AddNewObjects" it appears to not work.

When I try to add a new object I WANT to assign that object to an
appropriate project and subtask. When I try to do so, I get the error message
"You cannot add or change a record because a related record is required in
table 'Projects'.

How are the tables related? What are the Recordsource properties of
the form and subform? What are the Master/Child Link FIelds?

Normally one would have the mainform based on [Projects], or a query
selecting records form Projects; and the Subform based on
[summarytasks], using the ProjectID as the linking field. Perhaps
you're basing the subform on a query joining the two tables - this can
be made to work but isn't necessary and isn't always desirable.

John W. Vinson[MVP]
(no longer chatting for now)
 

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