Not copying data in form

Ssstacey

Registered User.
Local time
Today, 21:26
Joined
Aug 9, 2005
Messages
48
Hi,

I have a form on which I have asubform. This form is based on a query.
I would like the user to be able to add/and update information from excel to this form.
When I try to copy from Excel and paste them or try to overwrite the eisting data, I get the following error:
" You cannot add or change a record because a realted record is required in tabel "benchmark".

Can anybody tell me how to fix this?
thank u..
Stacey
 
Hi Stacey -

The message that you are getting is because of the relationships between two tables. The "enforce referential integrity" option has been set.

For example, suppose you have the following tables
tblAutos: AutoID (primary key), AutoName, ColorID (foreign key)
tblColors: ColorID (primary key), ColorName

If you have "enforce referential integrity" on the ColorID between tblAutos and tblColors, then you *cannot* enter a ColorID into tblAutos unless there is a matching entry in tblColors. This is to preserve the meaning of the fields.

Now, you could edit the relationships so that "enforce referential integrity" is off - but you might create problems in the data. You should look at the tables first and decide what types of data are allowed, and if you need to add some additional data to allow the type of input that is occurring.

Hope that helps,

- g
 

Users who are viewing this thread

Back
Top Bottom