I have been looking for Serial or sequential number in MS Access in multiuser environment. I could not find solution. Many people were suggesting DMAX method on after update. But in a multiuser environment it failed.
Remember: ( It is not ID (Auto number), which is not sequential because many numbers are missed and cant be reused in multiuser environment. ID as unique identifier will be still there), I am talking an additional field for sequential number / article number / serial number etc.
Wanted to share my experience, which worked for me. May be helpful for someone.
Just add this DMAX on "before update" event of a form. It will always be sequential in multiuser environment. I never faced problem after this.
Here is how....
Table Field is numbered field, default value is 0
On a form keep that control related to table field (mentioned), as invisible. So user wont see it. otherwise user will see only "0" as default value.
On Form_BeforeUpdate event
Hope this will help to get sequential number in multiuser system.
If some one else has better and easy solutions, or sequential number meaning Mix of Alphabets with numbers like abcde1345, are welcome to share their experience.
Note: it is for multiuser environment.
Remember: ( It is not ID (Auto number), which is not sequential because many numbers are missed and cant be reused in multiuser environment. ID as unique identifier will be still there), I am talking an additional field for sequential number / article number / serial number etc.
Wanted to share my experience, which worked for me. May be helpful for someone.
Just add this DMAX on "before update" event of a form. It will always be sequential in multiuser environment. I never faced problem after this.
Here is how....
Table Field is numbered field, default value is 0
On a form keep that control related to table field (mentioned), as invisible. So user wont see it. otherwise user will see only "0" as default value.
On Form_BeforeUpdate event
Code:
Me.FormcontrolName.Value = Nz(DMax("TableFieldNameBelongingToThatControl", "TableName")) + 1
Hope this will help to get sequential number in multiuser system.
If some one else has better and easy solutions, or sequential number meaning Mix of Alphabets with numbers like abcde1345, are welcome to share their experience.
Note: it is for multiuser environment.
Last edited: