Auto Number

Parra

Well-known Member
Joined
Feb 21, 2002
Messages
752
I would like to have the auto number or "something" like it, but I would like it to start from a higher number other than 1.

Something like 100000 and then every increment would grow by 150.

100000
100150
100300
100450
100600
100750
100900
101050
101200

Any Suggetions?
Thank Parra :ROFLMAO:
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
The ID field needs to be Number, not Autonumber (make it a Long Integer). Try this:

(1) Build a query that returns Max([MyFancyID]). The query field will be called LastValue.
(2) NextValue is a calc that increments LastValue by, say, 150.

Then you'll need some code that goes to [MyFancyID] and inserts the value for you.

Sub Form_Current()
If .NewRecord then
DoCmd.GoToControl("MyFancyID")
[MyFancyID]=[MyIncrementQuery]![NextValue]
End If

You may need to disable the control after saving the record, so nobody can play with the numbers.
 
Upvote 0
Autonumber ID's are really only for use within the database and not for things like invoice numbers as you can "Lose" numbers if someone cancels a dataentry once started.

To display your number you could just calculate it from a standard Autonumber:-
100000 + (Autonumber * 150)

HTH

Peter
 
Upvote 0

Forum statistics

Threads
1,221,553
Messages
6,160,468
Members
451,649
Latest member
fahad_ibnfurjan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top