New row to two related tables with one form (1 Viewer)

2wistd

Registered User.
Local time
Yesterday, 23:39
Joined
Jan 17, 2013
Messages
66
So I have a form, it has a few fields from a related table in it, related by the name. I click 'new' on the form, but when I click save Access complains about the related table does not have a matching record. How do I have it create a new record?
 

Cronk

Registered User.
Local time
Today, 16:39
Joined
Jul 4, 2013
Messages
2,774
Post the SQL for the form's data source.

Are New and Save buttons on the form?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:39
Joined
Feb 19, 2002
Messages
43,457
You will get this error message if you have an optional foreign key and the table has a default value of 0. The default for foreign keys should always be null. If the FK is required, set the required property to true.
 

Users who are viewing this thread

Top Bottom