autonumber format property

V

vassilis

hello ppl...
is there any way to transform an autonumber in a special format...
for example AEW-???...where AEW is a stable text and the ??? random numbers
with a specific lenght?
i cant find something like that in the Access s choices.
 
A

Al Camp

vassilis,
Since PK autonumbers should never be accessed, or even seen by the user,
you can create a calculated text control on your form with a ControlSource
of...
= "AEW-" & [YourAutonumberFieldName]

You wrote...
with a specific lenght?
Autonumbers are not a specific length. Why would you want to take something
like the frirst 3 digits of an autonumber in your string?
If you used...
= "AEW-" & Left([YourAutonumberFieldName], 3)
then 1234 and 12345 would both display AEW-123.
 
V

vassilis

thanks..its working as i want , but these autotext values from the form does
not appear in the original talble column...did i miss anything?

Al Camp said:
vassilis,
Since PK autonumbers should never be accessed, or even seen by the user,
you can create a calculated text control on your form with a ControlSource
of...
= "AEW-" & [YourAutonumberFieldName]

You wrote...
with a specific lenght?
Autonumbers are not a specific length. Why would you want to take something
like the frirst 3 digits of an autonumber in your string?
If you used...
= "AEW-" & Left([YourAutonumberFieldName], 3)
then 1234 and 12345 would both display AEW-123.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


vassilis said:
hello ppl...
is there any way to transform an autonumber in a special format...
for example AEW-???...where AEW is a stable text and the ??? random
numbers
with a specific lenght?
i cant find something like that in the Access s choices.
 
R

Rick Brandt

vassilis said:
thanks..its working as i want , but these autotext values from the
form does not appear in the original talble column...did i miss
anything?

It doesn't need to be in the table. Just use that expression wherever you need
it. If you don't want to re-write the expression multiple times, put it in a
query based on your table and use that query every place you would otherwise
have used the table.
 
Top