Help!--Cannot add new records to table

E

elizabeth baker

Hi. My problem is that one of my tables will not allow me to add new
records.

My tables (and relevant fields) are as follows:

tblContacts
ContactID (primary key)
tblContactInfo
ContactInfoID (primary key)
ContactID (foreign key)
tblAddresses
AddressID (primary key)
ContactID (foreign key)

Relationships are:

tblContacts.ContactID 1-to-many tblContactInfo.ContactID
enforce referential integrity
show all contacts and only contactinfo where joined fields are
equal
tblContacts.ContactID 1-to-many tblAddresses.ContactID
enforce referential integrity
show all contacts and only addresses where joined fields are equal

tblAddresses will allow new records; tblContactInfo will NOT allow new
records.
Foreign keys are not required in either related table.

What am i missing here? Why will tblAddresses let me update but
tblContactInfo won't?

Please help me.

Thanks, elizabeth
 
G

Guest

Elizabeth,
Are you getting an error message? You indicate a join property in your explanation. Are you trying to add the record through a query?

Just need a little more info... Jackie
 
E

elizabeth baker

Hi, Jackie. Yes, i am adding the record through an underlying query on
my form. When i click the add record icon, whether it is the built-in
one or my coded one, i get a message (i'm paraphrasing:) "You cannot go
to the specified record." Everything i've read in the knowledge base for
this message refers to trying to go the next record when you are at the
end of the file or a previous record when you are at the beginning of
the file. Nothing covers just trying to add a new record.

What i find peculiar is the following: my tblContactsInfo won't let me
add new records, yet tblAddresses will. They both have the same join
types, joined on ContactID in tblContacts. i see no discrepancy in field
properties. If i delete tblContactsInfo and then reconstruct it from
scratch, i can add records. As soon as i create a relationship between
it and tblContacts, no more records can be added. The add record icon is
dimmed. Referential integrity on or off doesn't seem to affect this. If
i then delete the relationship, i still can't add records to tblContactInfo.

i would think that it was the fault of the query feeding the form
because it's based on another query and maybe i did something wrong
there, but the tables themselves are affected irrespective of the query.

Thanks for your help. i've wasted a couple of days on this already.

--elizabeth
 
G

Guest

Elizabeth
Unless your table, or the form feeding your table is restricted to not allow additions I would not think the problemis in the table. This usually occurs when a query is using an outer join. Make sure when you view the query results that the add record button is not gray. If you are using a "totals" query where there is grouping, this will also occur. If you need to have a grouping coming into your query, first do a make table instead then you can bring that into your query without the restrictions

Hope this helps.
 

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