number keeps getting changed

B

_Bigred

I have a Offender table it contains a field InmateNumber

Example:
inmate may have a inmate number of 041823

but when I input it into the table, it ends up changing to 41823 (it drops
the zero at the front). The zero is necessary on some inmate numbers not all
of them.

how do i fix this shortcoming?
TIA,
_Bigred
 
F

fredg

I have a Offender table it contains a field InmateNumber

Example:
inmate may have a inmate number of 041823

but when I input it into the table, it ends up changing to 41823 (it drops
the zero at the front). The zero is necessary on some inmate numbers not all
of them.

how do i fix this shortcoming?
TIA,
_Bigred


As a Number, 041823 is the same as 41823. Unless you intend to
actually perform a math function using InmateNumbers, text would be a
more suitable datatype.
Change the datatype of the [InmateNumber] field to Text.

After you change the field datatype, you can run an Update query to
add the 0's back.
Update YourTable Set YourTable.[InmateNumber] =
Format([InmateNumber],"000000")
 
B

_Bigred

Hey Fredg,

that worked like a charm.

Thanks much,
_Bigred


fredg said:
I have a Offender table it contains a field InmateNumber

Example:
inmate may have a inmate number of 041823

but when I input it into the table, it ends up changing to 41823 (it
drops
the zero at the front). The zero is necessary on some inmate numbers not
all
of them.

how do i fix this shortcoming?
TIA,
_Bigred


As a Number, 041823 is the same as 41823. Unless you intend to
actually perform a math function using InmateNumbers, text would be a
more suitable datatype.
Change the datatype of the [InmateNumber] field to Text.

After you change the field datatype, you can run an Update query to
add the 0's back.
Update YourTable Set YourTable.[InmateNumber] =
Format([InmateNumber],"000000")
 

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