0

I have an Access database and i have a field attributed with unique indexed values. The problem is that when i execute an SQL insert statement with a duplicate value it does not raise an error it rather just skips the statement as if an On Error Resume Next statement is present above it.

Here is the gist of my code CurrentDb.Exceute "Insert Into IS24 (geocodes, realestateId) values (123456, 7788339)" So if 7788339 is already present it will simply not do the insert but would not raise an error either.

1 Answer 1

2

Try this:

CurrentDb.Execute "Insert Into IS24 (geocodes, realestateId) values (123456, 7788339)", dbFailOnError
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.