Alpha number attached to auto number

A

Akrt48

Is there anyway I can attach an alpha number such as "A" to my auto number
field? Thanks
 
V

Vincent Johns

Akrt48 said:
Is there anyway I can attach an alpha number such as "A" to my auto number
field? Thanks

Certainly! Just define a calculated field in your Query that catenates
the Autonumber (converted to text via Format$() ) with "A"!

But I suppose you wanted the "A" to be stored somehow into the
Autonumber field itself. Sorry, the Autonumber is a 32-bit signed
integer, not a string. You could probably calculate some kind of value
which would be the equivalent of a number catenated with a letter, but
that wouldn't be an Autonumber.

If you describe what it is you want this value (such as "888302A") to do
for you, I might be able to suggest other ways to accomplish that.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 
J

John Vinson

Is there anyway I can attach an alpha number such as "A" to my auto number
field? Thanks

No.

You can *display* the numeric value with a (constant) letter prefix,
using a Format property such as

"A000000"

to display the autonumber value 123 as A000123; or (if the alpha is
variable) store it in a separate field and concatenate it for display
purposes.

Note that Autonumbers are best kept concealed from view. They will
always have gaps, and may become random (e.g. if you Replicate your
database); that would have you dealing with numbers like A1193224115
followed by A-884240892.

John W. Vinson[MVP]
 
A

Akrt48

Thanks to you both, I guess what I want to do is show my auto number in a
form, complete with and A as in A01. I am sure there is a way that I can
store it, I know I can make my form show the auto number but am having
difficulty getting it to have an A in front. Concatenating in my query is no
problem but I don't need it in my query just the form from it which populates
a table. The number is used as a job number, so when it is set up we notify
a crew that they are on job # A05, I need the autonumber to make it not only
unique but so that a lot of people can enter a job and always get a new
number.
 
B

BruceM

You can simulate an autonumber. See the following link for one approach:
http://www.rogersaccesslibrary.com/download3.asp?SampleName=AutonumberProblem.mdb
Be sure to note the part that explains you must take a different approach in
a multi-user environment (such as yours). Once you have established the
number you can concatenate it as needed, either in the control source of a
text box or in a query. Something like:
="A" & [YourNumber]
but the details depend on your specific needs.
By the way, does every job start with the letter A? What happens after 99
jobs?
 
A

Akrt48

Thanks, the A actually means something; used with the autonumber it is almost
infinite.

BruceM said:
You can simulate an autonumber. See the following link for one approach:
http://www.rogersaccesslibrary.com/download3.asp?SampleName=AutonumberProblem.mdb
Be sure to note the part that explains you must take a different approach in
a multi-user environment (such as yours). Once you have established the
number you can concatenate it as needed, either in the control source of a
text box or in a query. Something like:
="A" & [YourNumber]
but the details depend on your specific needs.
By the way, does every job start with the letter A? What happens after 99
jobs?

Akrt48 said:
Thanks to you both, I guess what I want to do is show my auto number in a
form, complete with and A as in A01. I am sure there is a way that I can
store it, I know I can make my form show the auto number but am having
difficulty getting it to have an A in front. Concatenating in my query is
no
problem but I don't need it in my query just the form from it which
populates
a table. The number is used as a job number, so when it is set up we
notify
a crew that they are on job # A05, I need the autonumber to make it not
only
unique but so that a lot of people can enter a job and always get a new
number.
 
B

BruceM

The example in the link I provided will work just as it is. If you had
wanted some number of digits (e.g. 000001) you would have needed to add some
formatting. Just concatenate it as I have suggested to display the number
with an A in front of it. There is no need to store the A. However, if you
wish to do so, I posted some code in the formscoding group (in the posting
entitled "Manually incrementing number code..") that you should be able to
adapt for you needs.

Akrt48 said:
Thanks, the A actually means something; used with the autonumber it is
almost
infinite.

BruceM said:
You can simulate an autonumber. See the following link for one approach:
http://www.rogersaccesslibrary.com/download3.asp?SampleName=AutonumberProblem.mdb
Be sure to note the part that explains you must take a different approach
in
a multi-user environment (such as yours). Once you have established the
number you can concatenate it as needed, either in the control source of
a
text box or in a query. Something like:
="A" & [YourNumber]
but the details depend on your specific needs.
By the way, does every job start with the letter A? What happens after
99
jobs?

Akrt48 said:
Thanks to you both, I guess what I want to do is show my auto number in
a
form, complete with and A as in A01. I am sure there is a way that I
can
store it, I know I can make my form show the auto number but am having
difficulty getting it to have an A in front. Concatenating in my query
is
no
problem but I don't need it in my query just the form from it which
populates
a table. The number is used as a job number, so when it is set up we
notify
a crew that they are on job # A05, I need the autonumber to make it not
only
unique but so that a lot of people can enter a job and always get a new
number.
:

On Tue, 20 Dec 2005 16:13:02 -0800, Akrt48

Is there anyway I can attach an alpha number such as "A" to my auto
number
field? Thanks

No.

You can *display* the numeric value with a (constant) letter prefix,
using a Format property such as

"A000000"

to display the autonumber value 123 as A000123; or (if the alpha is
variable) store it in a separate field and concatenate it for display
purposes.

Note that Autonumbers are best kept concealed from view. They will
always have gaps, and may become random (e.g. if you Replicate your
database); that would have you dealing with numbers like A1193224115
followed by A-884240892.

John W. Vinson[MVP]
 
Top