I'm using Access(FE) and SQL(BE), Unbound Form using ADO:
I defined a Group Index (FirstName, LastName & Email) on my master table on the SQL Server to avoid duplcate entry which is
working
fine. My problem is how to trap or hold the ID of the existing record which is duplicated to the current entry? What I mean is:
Existing Record:
ID: 123
FirstName: George
LastName: Oro
Email: george@c...
New Entry:
ID: 123
FirstName: George
LastName: Oro
Email: george@c...
'DUPLICATE
cmdSave_Click
..connection
..inserting
..blah blah blah
err:
If err.number= -2147217887 then 'ODBC --- Call failed. basically there's a duplicate found
dim lngDuplicateID
lngDuplicateID= rs("ContactsID") should be 123 ??????????????
I want to hold that ID (123) so I can give some other option to the user (View Info of Duplicate found, Overwrite blah blah blah...
I believed loop to entire rs will do but I'm dealing with 50K records...
Any tips would be highly appreciated...
TIA,
George