I have a form that I use for requistions. I set the Req# to be the Max data ID +1 to generate a new Req#( they do not need to match, nor be exactly 1 off, it is just I need a unique # for the req#.) The Req#field gets filled out, and the user finishes the form and clicks save to submit the form. All is good.
That is, until two users access the Req form at the same time. Then they both get assigned the same Req# as the time from opening a new req form and saving the request can take over 20 minutes. I have considered several plans of attack, but all are shot down for various reasons. So, what I would like to do is once the Save button is clicked, I would like to check the Max(ID) one more time as the record is being written, and reassign the Req# to be Max(ID) + 1. That way no two req#s will be the same.
I would then like the system to indicate the changed #, either by a message box that tells the user of the change, or at least changes the Req# format to Red, or Bold Text...something that would show a change.
I code in VB. (In old VB, you just set the event for the Req# textbox that one change of the value, it changes the object's format. I can't find object properties, so I cannot seem to be able to do that.)
Professionalism, Understanding, and Attention is how I deliver quality to my clients.