Way to get access to skip #'s.... (1 Viewer)

Daxton A.

Registered User.
Local time
Today, 07:03
Joined
Dec 30, 2002
Messages
65
What the problem is, is this db that I'm making. Its a Bill Of Lading, which is a form that prints out and gets shipped with all of our parts that we ship off. Which we work in a plastics plant. So is there a way to get access to start on that #? The # we're on is 1680 and I want it so access assigns a # up from the last # & I want it not able to be messed with but I want it visible b/c when we ship it off the part of our form that tells our plant in Illinois, which bill of lading it is.
 

Kevin_S

Registered User.
Local time
Today, 02:03
Joined
Apr 3, 2002
Messages
635
Daxton -

If you just want to continually increment 1 then your best bet is to use a Autonumber data type. This will always increment by 1, can be set visible, and cannot be edited so you wont have to worry about anyone changing the value. You can also set its property to start at a certain point so instead of 1 you could set it to start a 10 if need be or, in your case, 1680. One note* - autonumber will ALWAYS increment one even if a record is deleted so for example:

Record #
1
2
3
4

If you delete number 3 then next number will be 5 - if you delete number 4 the next number WILL ALSO BE 5 - so your numbers will look like this:

Record #
1
2
3
5

If you want the number to fill in missing numbers then you will want to use a number data type and use the DMax function to get the last value entered and add 1...

HTH,
KEv
 

neileg

AWF VIP
Local time
Today, 07:03
Joined
Dec 4, 2002
Messages
5,975
If you create a table with an autonumber ID you can 'seed' the autonumber by appending another record with the value 1680. Beware, however, that if users start to create a new record and abandon it, that you can loose the continuous numbering in an autonumber field. There are other solutions using DMax().

This has been discussed often in these forums so I suggest you do a search.
 

Users who are viewing this thread

Top Bottom