Duplicate Update Problem

  • Thread starter Thread starter Kevin C.
  • Start date Start date
K

Kevin C.

Hi-

I have a query that updates a username to a particular
record in a table. The query is run through a form, and
the user clicks on their name and types in what to assign
to themself. The problem is that there may be possible
duplicate reocrds in the database, but only 1 of the
duplicate records needs to be updated, not both of them.
The only distinguishing feature between the 2 records is
the ID# (Autonumber). How do I tell the query to update
only 1 of the records and not to update all of the
duplicates as well?
 
Specify the desired ID in the WHERE clause.

Update tablename set fieldname = value where id = {desired id to be updated}


--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
This won't work because the user won't know the ID. What
they are typing in is a loan # which is part of the
information that is duplicated in the records.
 
Ok, then... what else about the record to be updated is unique, and known,
such that only that one will be updated and not the others?
 
The only distinguishing thing about the records that is
different is the ID# (Autonumber). Everything else is
exactly the same.
 
Back
Top