Pad a number with leading zeroes

A

Alan T

I have a number would like to pad with leading zeoroes so that to make up as
3 digits string.
eg.

1 --> 001
12 --> 012
999 --> 999
 
T

Tom Lake

Alan T said:
I have a number would like to pad with leading zeoroes so that to make up
as 3 digits string.
eg.

1 --> 001
12 --> 012
999 --> 999
Store it as a string then use

Right("000" & [Yourstring], 3)

where Yourstring is, of course, the name of your string.

Tom Lake
 
S

Steve Schapel

Alan,

Set the Format property of the applicable controls on your form and
report like this:
000
 

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