Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Access Newsgroups
Access General
Sequential numbering of records
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="BruceM, post: 1056176"] One method is outlined here: [URL]http://www.rogersaccesslibrary.com/download3.asp?SampleName=AutonumberProblem.mdb[/URL] Note in particular the method for dealing with a multi-user environment. You could add the Nz function to take care of the first record, which may not have a value: =Nz(DMax("SomeField","SomeTable"),20000)+1 You could also use the code in the form's Current event, with modified syntax: Me.SomeField.DefaultValue = Nz(DMax("SomeField","SomeTable"),20000)+1 or If Me.NewRecord Then Me.SomeField = Nz(DMax("SomeField","SomeTable"),20000)+1 End If If you already have records that are numbered as you would like you can omit the Nz: =DMax("SomeField","SomeTable")+1 [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Access Newsgroups
Access General
Sequential numbering of records
Top