need to string an autonumber & text field to create a new field?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to create a sequential record identifier that is made of a fixed text
string and the sequential number, i.e. Book-nnnn, where "book-" is always the
same and nnnn is a sequential record number, similar to what an Autonumber
field would do.

Ideally, the auto number source and the resulting field value (book-nnnn)
would be in the same table as there are other data elements related to the
row.
 
dfeigen115 said:
I need to create a sequential record identifier that is made of a fixed
text
string and the sequential number, i.e. Book-nnnn, where "book-" is always
the
same and nnnn is a sequential record number, similar to what an Autonumber
field would do.

Ideally, the auto number source and the resulting field value (book-nnnn)
would be in the same table as there are other data elements related to the
row.

You certainly should NOT store the field redundantly; in fact you don't need
to store the constant text string "Book-" at all.

Simply set the Format of this autonumber field to

"Book-"0000

When it's displayed you'll see the text.

Note that Autonumbers are usually best left hidden. They have one purpose
only: to provide a unique key. There is NO guarantee that they will be
sequential - they will have gaps if you delete a book, or even hit <Esc>
partway through entering a new record; and they can become random.

John W. Vinson/MVP
 
John,
Thanks for the quick response. I am aware of the potential of gaps in the
autonumber sequence, however, this is ok for my application.
Dan
 
Back
Top