|
-
Feb 9th, 2010, 04:22 AM
#1
Thread Starter
Fanatic Member
ms access cant append all the records due to key violations
Hi,
question:
I would like to catch and handle this error (on Error doesn't catch this type of error)
How can I catch this error?
more details:
I'm running a function that inserts records into a table .
while something
mySerial = DMax("serial", "myTable") + 1
sqlstr = " INSERT INTO myTable ( serial SELECT " & mySerial & "; " )
docmd.runsql sqlstr
wend
On same cases the function halts on "ms access cant append all the records due to key violations".
Checking this further reveals that the that serial generated is already occupied - probably in the case where another user created a new record between generating mySerial to the point where actually runsql tried to commit the new record insert (?)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|