Q: leading zero

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have a text field in my table that has numbers. How can I write a query
that puts some leading zeros for only numbers less than 3 digits. So if 1234
or 123 do not touch, if 12 make it 012. How can I do this?
Thanks,
Jim.
 
IIf(Len(CStr([MyNumber])) >2, CStr([MyNumber]), Format([MyNumber], "000")
 
Jim,

The easiest way to do that would be to change the data type to text.

Tim
 

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

Back
Top