A
Amanda Payton
I'm in the process of developing a program for my company that updates it's
records from a CSV file every morning. Unfortunately - due to someone being
asleep at the switch elsewhere in my company, I occasionally have records
with duplicate primary key values in that file. Of course - that means that
the first person to open the program each morning sees the ever-so-lovely
pop-up box "Access could not add (x) records due to a key violation". Which
is great - but not all that informative to the non-programmer.
I know just enough about error handling to be dangerous (that's the current
"zone" my learning curve is in right now). What I would like is for that
box to tell the user the value of the primary key at the point the error was
generated - and possibly drive an e-mail to the system admin to make sure the
duplicate is weeded out. (e-mail is optional... so long as the offending
record ID is easily identified)
I'm figuring out how to handle errors in my custom functions, but I'm a bit
thrown off by those inside intrinsic functions (docmd.transfertext), so I
don't know if it's possible for me to override the intrinsic error handling.
Thank you in advance for helping me reduce the stress-volume in my office!
Amanda
records from a CSV file every morning. Unfortunately - due to someone being
asleep at the switch elsewhere in my company, I occasionally have records
with duplicate primary key values in that file. Of course - that means that
the first person to open the program each morning sees the ever-so-lovely
pop-up box "Access could not add (x) records due to a key violation". Which
is great - but not all that informative to the non-programmer.
I know just enough about error handling to be dangerous (that's the current
"zone" my learning curve is in right now). What I would like is for that
box to tell the user the value of the primary key at the point the error was
generated - and possibly drive an e-mail to the system admin to make sure the
duplicate is weeded out. (e-mail is optional... so long as the offending
record ID is easily identified)
I'm figuring out how to handle errors in my custom functions, but I'm a bit
thrown off by those inside intrinsic functions (docmd.transfertext), so I
don't know if it's possible for me to override the intrinsic error handling.
Thank you in advance for helping me reduce the stress-volume in my office!
Amanda