Custom AutoNumber

  • Thread starter Thread starter ryanb
  • Start date Start date
R

ryanb

Hi all,

I'm new here, so here goes my first question.

I'm making a table for tracking a type of form that I use.

The forms are numbered for tracking and I want to apply that number t
the table, the field is set to 'Autonumber' & is also the primary key
what I want to to is for the autonumber to be formated like so 'F0001
being the first and then counting on from there.

Can anyone let me know how to do this?

Cheers,

Ryan
 
what I want to to is for the autonumber to be formated like so 'F0001'

Ryan,

The datatype of an autonumber column is long integer.

Not sure what you are trying to do but it might be better to add a column for ObjectType where F=Form, and let the autonumber column do its own thing.

Jay
 
The forms are numbered for tracking and I want to apply that number to
the table, the field is set to 'Autonumber' & is also the primary key,
what I want to to is for the autonumber to be formated like so 'F0001'
being the first and then counting on from there.

If the number is preprinted on the form, then it's safer just to let the
user type the number in... Using almost any automatic method you are likely
to get gaps in the sequence here and there -- this includes the paper forms
that get messed up and binned and it is unlikely that two separate counting
mechanisms will keep in step. An easy half-way house is to get a keyboard
with a barcode pen and read in the numbers.

If the form is going to be produces all by the PC, then you can indeed
allocate the numbers programmatically. Autonumbers have a "disadvantage"
that they get allocated as soon as a record starts to be filled out, and if
the record is cancelled that number is used up anyway. This will produce
gaps in your form numbers, which may or may not be a problem. You can write
little bits of VBA that will allocate the number later in the process,
which will reduce such gaps. Google for "Access Custom Autonumbers" and you
will get lots of ideas -- one may suit your needs.

Hope that helps


Tim F
 
Back
Top