Leading Zeroes

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!
 
C

Cameron Sutherland

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
 
J

John Vinson

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.
 

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