Leading Zeroes

  • Thread starter Thread starter Anna
  • Start date Start date
A

Anna

I am trying to make a query that will return data in 1
column with leading zeroes. The data in the field can only
be 2 characters in length, but some data in the field
is "71", but the other option is "1", so I want it to
return "01" to me.

How can I do this without using SQL language? using input
masks or what? I'm not a programmer!
 
In your query make a new calculated column that will
format the output of your numbers to a fixed width with
leading zeros.

NewFieldName: Format([Field1],"00")

-Cameron Sutherland
 
I am trying to make a query that will return data in 1
column with leading zeroes. The data in the field can only
be 2 characters in length, but some data in the field
is "71", but the other option is "1", so I want it to
return "01" to me.

How can I do this without using SQL language? using input
masks or what? I'm not a programmer!

I'd suggest using a Text field, not a number field, unless you're
going to be doing calculations with the value. Set the field's Input
Mask to 00 to force entry of two digits.

If it is a number and you just want to see leading zeros (realizing
that they won't be stored and that 1 and 01 are the same number), just
set the Format property of the field to 00.
 
Back
Top