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

D

dfeigen115

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.
 
J

John W. Vinson/MVP

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top