Duplicate Entry Alert

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone,

I have a question about the alert of duplicate entry. I have looked the
group posts which are not quite matching my case. Can someone please kindly
help.

I have a form, writes data to a linked table. Data can't be duplicated in
one of the field named Abbreviation . How can I go about doing that?

When I create a new record, put in "ABC" in Abbreviation field, if ABC is
already existed in one of existing records, it should alert me not to
continue. The table is using autonumber as primary key.

Please help by writing a detail codes if you can, I am new to this
territory. Thanks!
 
Have you set a Uniqiue index for this column in your table design? To do
this, put the table into Design View and click on the Index icon (it looks
like a bolt of lightning).
Then add a new index by typing in the index name (which can be the same as
the column name) and select the column name from the drop-down list. Then in
the properties section, set Primary to No, Unique to Yes and Ignore Nulls to
No.
Then save the form design and you should find that you are now unable to add
a record with the same value as one that already exists.

Hope This Helps
Gerald Stanley MCSD
 
I tried carefully, it worked the way you suggested not allowing duplicates,
but it shows warning message "You can't save this record at this time", have
to close out and lost all entry.

It'll be nice that if I TAB out the field, if record exists, warns me before
continue. It'll make a lot of sense not to waist time to enter all data then
tells me can't save.

Any help is appreciated!
 
Back
Top