Format(dteCurDate, "yy")

L

Leonard

I would like this to show up as "03" in my table but it
only shows up as "3". How do I force the zero to appear?

Any suggestions welcom.

Private dteCurDate as Date
dteCurDate = Date
[OrdNumYr] = Format(dteCurDate, "yy")
 
K

Ken Snell

If OrdNumYr is a number field, then it will store the value as 3. ACCESS
drops off leading zeroes in such situations.

If you don't wish to change the field format to Text (which will retain
leading zeroes), then you will need to format the display of the number on
forms and reports, using the Format property of the control.
 
L

Leonard

Thanks Ken
-----Original Message-----
If OrdNumYr is a number field, then it will store the value as 3. ACCESS
drops off leading zeroes in such situations.

If you don't wish to change the field format to Text (which will retain
leading zeroes), then you will need to format the display of the number on
forms and reports, using the Format property of the control.

--
Ken Snell
<MS ACCESS MVP>

Leonard said:
I would like this to show up as "03" in my table but it
only shows up as "3". How do I force the zero to appear?

Any suggestions welcom.

Private dteCurDate as Date
dteCurDate = Date
[OrdNumYr] = Format(dteCurDate, "yy")


.
 
K

Ken Snell

You're welcome.

Leonard said:
Thanks Ken
-----Original Message-----
If OrdNumYr is a number field, then it will store the value as 3. ACCESS
drops off leading zeroes in such situations.

If you don't wish to change the field format to Text (which will retain
leading zeroes), then you will need to format the display of the number on
forms and reports, using the Format property of the control.

--
Ken Snell
<MS ACCESS MVP>

Leonard said:
I would like this to show up as "03" in my table but it
only shows up as "3". How do I force the zero to appear?

Any suggestions welcom.

Private dteCurDate as Date
dteCurDate = Date
[OrdNumYr] = Format(dteCurDate, "yy")


.
 

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