cannot delete duplicate record problem

Davros

Registered User.
Local time
Today, 21:48
Joined
Sep 9, 2005
Messages
131
hi
simple problem but i'm looking for a simple solution but can't seem to find it.
part of my tables data is copied over to another table - sometimes this data is a duplication. when i try to save the record i get the standard access duplicate message. all this is fine. however when i try to delete the record i cannot - i get the message "the changes you made to the table were not successful......"

when i get the above message all i want to do is click the delete button to clear the record but this does not work. access obviously wants to make changes to the table first and then i can delete the record but being a duplicate it will not make changes to the table ergo i cannot delete it.

it seems such a simple and obvious problem yet i can't figure out how to 'fire' the delete button.

(i don't want to use dlookup or dcount)

any ideas anyone?

thanks
 
As I can understand you, you try to delete a field, not a record.
For delete a record, you have to tick the record on the RECORD SELECTOR,
after theat try to delete it.
 
If you get the "duplicate message" then the duplicated records is simply not saved. There will be no duplicate record to delete.

Why are you copying records from one table to another anyway? You're causing duplicate records thereby breaking basic normalization rules.

How many records are being copied over at a time?
 
yes
tha's what i was thinking - there is no record to delete as none has been saved.
as to why i'm doing it - i'm testing a database and i have to consider that someone will create duplicate records. they will then have to delete them simply ie by clicking a button.
basically because they will not receive any access training i have to try to guess all the problems that will arise.
i'm thinking that it's probably best to check for duplicates before the record is created on the beforeupdate event

thanks anyway
 
In that case, click on the icon UNDO (some times).
 
i'm thinking that it's probably best to check for duplicates before the record is created on the beforeupdate event
That's the way to go.

Or you can trap the specific error and undo as MStef mentioned.
 
cheers guys - i'll try the above.
the monkeys i build simple databases' for do like their buttons.
 

Users who are viewing this thread

Back
Top Bottom