Forum Discussion
Custom Auto-number field data type problems
Nobody will take this number add involved in computation.
the OP, which is the programmer knows that, and knows what he is doing.
I get that. I guess it's too subtle a point for some.
The StudentID itself DOES NOT INCLUDE the ATD as part of the saved value, which is unambiguously a Long Integer.
ATD is there for display only.
You yourself admit that in your next response.
"...because on each records you will have same info on one field that is "ATD", ..."
It clearly, unambiguously, is NOT part of the StudentID whether it's a separate field or merely a display only prefix.
I did suggest a separate field on the possibility that, at some point, there would be other, different prefixes needed. If the only value ever permitted for this three-letter prefix is the "ATD", then that reinforces once again. It's not part of the StudentID itself, it's a display only feature and otherwise unnecessary.
And finally, at the risk of offending the OP, let me quote WHY it's necessary to point out the obvious to him (and apparently to you).
" I do realize my "auto number" - "ATD"0000 - is not actually a number. I think the problem is that by default, Access labels the datatype of any auto number, regardless of whether it is a custom auto number with alpha characters or not, as a number. "
That is an inaccurate assertion. The underlying AutoNumber IS a number. It is a Long Integer. Access did not "label" it as such. You should know that. You do know that!
Once more for the OP.
- AutoNumbers are Long Integers.
- It's possible to format them for display only with prefixes, suffixes, leading 0s and other adornments.
- The value in the Autonumber field itself is saved without any of those adornments.
- Access allows the display of the adornments as an aid to humans.