Display Leading Zeros

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

Guest

Hi. I have a field that I have defined as numeric, integer. On my report, I
want it to print high order zeros. (For example, if the field contains 155,
I want four characters to print 0155). I've tried using function str to
convert it but no luck. I tried using a format and that didn't work. Thanks
 
"Chatty Cathy" wrote
Hi. I have a field that I have defined as numeric,
integer. On my report, I want it to print high order
zeros. (For example, if the field contains 155,
I want four characters to print 0155). I've tried
using function str to convert it but no luck. I
tried using a format and that didn't work.

Using the format "0000" in the Format Property of the Control in which you
display the number should display four digits of your number (that will also
be the case, BTW, if the number is greater than 9999, which an integer might
be), if the number is always positive. it doesn't help us much to know that
you "tried using a format and that didn't work" because your didn't tell us
_what_ format you tried that didn't work -- and, as you might expect, there
are many formats that will not display four digits including lead zeros, and
no more.

Larry Linson
Microsoft Access MVP
 
Larry, I know I tried that in the format and it didn't work last night (maybe
I was just too tired). Well it does work now, so thank you very much.

Cathy
 
Back
Top