You can not add or change a record because a related record...

  • Thread starter Thread starter Dennis
  • Start date Start date
D

Dennis

Hi,

I have a table to which I am trying to manually add a record.

When I add a record directly to the table using query, I receive the error
message "You cannot add or change a record because a related record is
required in table 'tblMailingList-100220'".

First I do not have a table called tblMailingList-100220. I do have a table
called tblMailingList.

Originally I had setup a relationship between tblMailingList and tblRenew
where I joing the two tables by AcctNo and enforce referencial integrity and
cascade update and delete. I have removed the referential integrity and the
cascase update and delete. Then I deleted the relationsihp between the two
tables and I still can not add a new record.

I'm in the development phase. I will eventually have a form to allow the
user to enter data.

Any idea what is wrong. I do have other queries where I have the
tblMailingList and tblRenew tables joined, but I'm not using those queries at
this point in time.

The tblRenew and tblMailingList was joined by Acct #. tblMailingList is
keyed by AcctNo. tblRenew has AcctNo as a foreign key.

There is an existing account number for the record I'm trying to create in
tblRenew.

Any suggestions?

Thanks,

Dennis
 
Open the relationships window and select the button to show all
relationships.
Find the forgotten relationship and delete the line that relates
tblMailingList-100220 to any other table.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Jeanette Cunningham,

Once again you were correct!

Like I said, I have a table called tblMailing-List, but not one called
"tblMailingList-100220". Do you have any idea where the table
"tblMailingList-100220" came from? Did I create this while I was asleep or
did Access create it show how?


Thanks,

Dennis
 
I can't say how this happened.
But I do know for sure that as I became more experienced these sort of
things disappeared from my databases.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Like I said, I have a table called tblMailing-List, but not one called
"tblMailingList-100220". Do you have any idea where the table
"tblMailingList-100220" came from? Did I create this while I was asleep or
did Access create it show how?

If you haven't unchecked "Name Autocorrect" in the Options, it's quite
possible that Access *did* create it for you. This feature has earned the
nickname "Name Autocorrupt" with good cause!
 
I didn't know that Name Autocorrect would do that in a database.
Thanks for the heads up.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
On Sat, 20 Mar 2010 09:26:25 +1100, "Jeanette Cunningham"

It will if you rename a table.
I didn't know that Name Autocorrect would do that in a database.
Thanks for the heads up.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Dennis said:
Hi,

I have a table to which I am trying to manually add a record.

When I add a record directly to the table using query, I receive the error
message "You cannot add or change a record because a related record is
required in table 'tblMailingList-100220'".

First I do not have a table called tblMailingList-100220. I do have a
table
called tblMailingList.

Originally I had setup a relationship between tblMailingList and tblRenew
where I joing the two tables by AcctNo and enforce referencial integrity
and
cascade update and delete. I have removed the referential integrity and
the
cascase update and delete. Then I deleted the relationsihp between the
two
tables and I still can not add a new record.

I'm in the development phase. I will eventually have a form to allow the
user to enter data.

Any idea what is wrong. I do have other queries where I have the
tblMailingList and tblRenew tables joined, but I'm not using those queries
at
this point in time.

The tblRenew and tblMailingList was joined by Acct #. tblMailingList is
keyed by AcctNo. tblRenew has AcctNo as a foreign key.

There is an existing account number for the record I'm trying to create in
tblRenew.

Any suggestions?

Thanks,

Dennis
 
Back
Top