A problem with duplicate records

I'm having some problems with an app I'm making.

It collects data from a text-file, but I'm dependent on having unique values. Unfortunatly the text-file I'm grabbing data from, has a few duplicate entries and this is causing a problem when using this code where tbl_data_unique is Primary Key:

dtagames.Recordset!tbl_data_unique= ldata(0)
dtagames.Recordset!tbl_data_name = ldata(1)

It's possible to remove the primary-key and remove duplicate records afterwards, but my preferred solution would be to have some error handling, skipping the recordset-creation if the fieldvalue already exists (As I'm getting an error message, it should be possible to trap this message and move on, shouldn't it?).
If this is not possible however, I would like to get some advice on removing duplicate entries in my table efficiently.

Thank you for your time...

EDIT: Sorry for posting this in the wrong section. Visual Basic -> VB DB would be more appropriate.

Who is Participating?
SethiConnect With a Mentor Commented:
In Error handler use The "Resume Next" statement and your problem will be solved.
tyrronAuthor Commented:
That was easy :)

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.