Re: Duplicate values prevent adding new records
- From: "Brian" <s@y>
- Date: Mon, 26 Feb 2007 12:33:06 -0400
The error message has to do with the value of the key field of the new
record, it is the same as one that is already there. From your last comment
it sounds that your table design is bad. If it is possible that two records
can have the same value in a field, that field cannot be a primary key. If
it is all the fields can be duplicated then it means that you don't really
need a primary key - they can be indexed but not primary. If you still want
a primary key you can add a new field called say, ID, and make it autonumber
which will always be unique.
"Kevin" <Kevin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
I have a form which displays summarized information on Mission Reports in
number of textboxes. The textboxes are locked. In order to edit the
information for a given report, I have created another form (for editing
adding new records)with identical textboxes which is opened by a command
button. when I click on the new record button and attempt to add new
information for a second Mission report and then close the form, I get a
message saying: "The changes you requested to the table were not
because they would create duplicate values in the index, primary key or
My main form and my form for editing display information according to
country. Both have the same underlying table (Table 1) where countries and
their country codes are listed alphabetically. The primary key is
The two forms are filtered.
My question is what do i need to do to be able to add new records in the
Edit form without creating duplicate values? I have attempted changing the
primary key in Table 1 to code or region for example but to no effect.
Would appreciate any help.
- Prev by Date: Populate read-only form from SQL stored proc
- Next by Date: Re: can a login filter records so users can share forms
- Previous by thread: Populate read-only form from SQL stored proc
- Next by thread: Re: checking for blank values