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")


.
 
Top