Incrementing Number Field

franc75

New member
Local time
Today, 11:22
Joined
Mar 3, 2005
Messages
6
Hi,

I need to add a new field to display a reference which is automatically generated when a new record is added, except the numbering format will need to be:

10001/0 ... 10001/1 ... 10001/2 ... etc ... 10001/9 ... 10002/0 ... and so on.

I will use code to check the last one used and add +1 (+0.1), but I'm not sure what type of data field to use.

Obviously this cannot be an autonumber field, so should I use a 'text' or 'number' data type? If I used a number type, I could set it to 1 decimal place, but is there a way to display the "/" (slash) instead of the decimal point?

Any comments & advice appreciated
 
this in the format property of an autonumber field seems to give what you are asking for:

0\/0
that is a zero, \, /, and another zero

The "\" says to take the next character and put it there just as is. the last zero is really a place holder for the last number in the string of numbers.
 
Brilliant! Thank you.

Any idea how to get it to get it to **/0 before **/1 instead of after **/9 ?
 
The only way I know of to start an auto number field at 0 rather than 1 is to add the 0 record with an Append query. And, because it must be the highest number in the table if you want it to be the starting point for the next number, the table will have to be empty before starting.
 

Users who are viewing this thread

Back
Top Bottom