Any Help ? Error 3341

  • Thread starter Steven Craig Basham
  • Start date
S

Steven Craig Basham

I'm hoping someone can better explain to me the problem I'm having. I have
a form set up that shows contact information for a client. Each client has
many buildings, each building has many contacts. When entering the
information for a contact, I first filter my combo box for all building
belonging to the client entered for the contact. Then, when I try to select
the building for the contact from the filtered control, I receive the
following error message:
The current field must match the join key <name> in the table that serves as
the 'one' side of one-to-many relationship. (Error 3341)
You have tried to enter a value into the join field in the many-only table
of an outer join with no corresponding value in the join field of the "one"
side table.

The message includes the following instruction: Enter a record in the "one"
side table with the desired key value, and then make the entry with the
desired join field in the "many-only" table.

The problem is... I don't know what it's trying to tell me... it seems I
have no problem adding the contact record directly within the table. I just
can't get to it from the form version. Any suggestions/ideas what I need
to fix?

Thank you so much for your help!

Steven Craig Basham
 
T

tina

sounds like your table design is a one-to-many relationship between Clients
(one) and Buildings (many), and a one-to-many relationship between Buildings
(one) and Contacts (many). the best way to handle data entry in parent/child
tables is using a form/subform setup; when they're built correctly, Access
will automatically add the parent record's primary key to the foreign key
field in the child's record. if you're not using a standard main form /
subform setup, you have to make that entry yourself either manually or
programmatically.
take another look at your form design. how are you entering the building
record's primary key in the Contacts record, when you add a new contact?
 

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