alpha numeric auto number

G

Guest

I have 2 Tables
the tables have auto number fields

1. Purchase
PurTransId (auto number)

2. Sales
transId (auto number)

they both start from 1
i need to change them with alpha numeric numbers (something like pur001) and
(sal001)

is this possible?
 
D

Douglas J. Steele

Not really. You could apply a format of \p\u\r000000 or \s\a\l000000 to the
respective fields, so that it would look as though they have a prefix, but
it wouldn't actually be stored in the table, which would probably lead to
problems when attempting to join with other tables.

However, why do you want to do this? Autonumbers have one purpose only: to
provide a (practically guaranteed) unique value that can be used as a
primary key. Adding the letters at the front doesn't make the key any "more
unique". You should never try and assign meaning to the value of an
autonumber field. In fact, it's unusual to even show the value of an
autonumber field to your end users.
 

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