Automatic Number Generation

I have an application which is used by 3 different users.

  1. Assuming User1, User2 and User3 clicks on button “Create New Document”. The system generates document Number = “1”. Hence all 3 Users will see Doc Number =“1”. This is a document number which, assigned to a document which get increamented by 1 everytime user creates a new document. It will not be saved until user saves the document.

  2. For example if User1 Saves the document. Then User2 Saves the document. At this time document will be saved but there will be 2 physical documents saved with same Doc number as “1”. What is the best way assign seperate numbers to a new document? Meaning Even if all 3 users clicks on the “Create New Document” button.

Thanks in advance

MS

Subject: Automatic Number Generation

When a new document is created then only thing that can be assigned is a TEMP reference number. that, is, when the document is saved, in the OnSubmit event (or equivalent) you have to do a check to see what the reference number should be again, and if the new ref number is different from the original temp ref number then just pop a msgbox notifying the user of the change in ref number.

HTH

ST

Subject: Automatic Number Generation

Maybe http://www.xetrion.com can help you.