Access Warning / 3022 Error Message Does Not Appear

S

soflahe

I am importing text from daily csv files into an Access table. I've used a
series of vb loops to build the SQL strings and execute them. This part is
working fine. I can succesfully import the data to the table. However, I
have an index field and I have specified that duplicates be 'Not Allowed' as
I do not want to create duplicate entries.

When I run the sub-routione, as I expected, Access will not allow me to
duplicate entries. However, I get no error message. I'm pretty sure that ij
the past I had a similar routing but I got a 3022 error message which I could
capture. I get no such error message this time (and no warnintg dialog box
either).

Any suggestions will be gratefully appreciated.
 
S

soflahe

Worked it out - simply needed to append the dbFailOnError option db.Execute.

db.Execute sql_statement, dbFailOnError
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top