Ok, this may not even be possible, but I have to ask if anyone can think of anything. Searches have come up empty.
What I am trying to do in a form is after updating a customerID field, the next field CustomerEntry# populates with a 1. Easy enough.
The issue is that these 2 #'s combined form a unique ID in the table, so I want to make it so if the runtime error for duplicates comes up, it goes to the error handler and adds one to the value, then rechecks for duplicates again, and if the error occurs, try again, etc until there is no duplicate anymore.
Because the duplicate is in the table, not the form, I need to refresh the form to get the desired error. I have successfully got it to loop through once, changing the answer to 2, but after that the OnError doesn't seem to work and the error pops up with the form refreshes again.
I appreciate any ideas people might have. I'm a novice with OCD which is a bad combo ;) After 3 hours of failing I decided to stop trying and seek advice. Thanks to all.