RainLover
VIP From a land downunder
- Local time
- Tomorrow, 07:47
- Joined
- Jan 5, 2009
- Messages
- 5,041
Okay RainLover I changed my field name to "PO". I took the single user code and tried it and it doesn't work for me. I'd also like to know how your single user form is updated. I see that you have it written for AfterUpdate but don't see where it actually gets updated.
I assumed you downloaded my sample for single user.
Follow this.
Open the Database by holding down the Shift key.
Open The form in design view.
Select the field txtMyLetter, On the Right you should see an elipse. Click on the ellipse. It should take you to the code.
Note the DB was designed to add a prefix. Like A1, A2. B1, B2, B3 etc. I know you don't need that but that is the way I wrote it.
Once the Focus/Mouse leave that Field it will be written to the table. It is very difficult to get that number back if you want to later. My DB was written for display purposes. A production DB would have the update (Allocation of the number) just before the form is written to the table. It is the most efficient without writing days of code. My Multi User does this but I advise against using it as there is very little support for it.
Please bear in mind, ( Like Others are telling you) once you use the number it is lost.
My question is why do you want to do this. I can see no real advantage.
There is one other alternative is to display in a Unbound Box of its own the highest number used so far. You could even add a one to it if you wanted.
But caution, most of the time this is the number that will be recorded but not guaranteed. If you can't guarantee your data you are not writing correctly.
Next question Please. PS Bed time for me in 1 hour.
BTW am I on the right track that you want.