AutoNumber (1 Viewer)

Raven

Soozie's watchin' you!
Local time
Today, 11:52
Joined
May 1, 2002
Messages
48
I would like to have a field which is a unique identifier.

I'm aware if I use the AutoNumber Data Type in a table I will be given a new number for each record. But I would like to pre-fix this number with a letter, ie LEA1, LEA2, LEA3....

Can anyone advise?

Thanks.
 

casey

Registered User.
Local time
Today, 11:52
Joined
Dec 5, 2000
Messages
448
What you want is a calculated field. Your autonumber [ID#] will act as the unique identifier. You should leave it like it is. If you want to add a prefix that is an existing field in your table, you can use a calculated field...(The autonumber [ID#] field and the [Prefix] field can be concatenated.)
Just add another field to the form's recordsource or query that you have.

Ex.
If you use the autonumber field [ID#] and "LEA" is an instance of the [Prefix] field in a table. Create your identifier by using QueryBuilder on the form's recordsource or query where you want to see the identifier:

add another field to the query....
Identifier:[Prefix]&[ID#]
(therefore this field will look like: LEA1, LEA2, LEA3)

In other words: Leave you autonumber as it is...
If you want to view the records as LEA1, LEA2, so on you can create a field that looks the way you want it, but all it does is look that way(for the users assistance or something). When you want to refer to the actual records in the table, you only need to reference the autonumber [ID#]. If a [Prefix] field actually exists in the table, all the information about that record is known given the [ID#].
 
Last edited:

Users who are viewing this thread

Top Bottom