Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format to 4 digit

Status
Not open for further replies.

dixxy

Technical User
Joined
Mar 4, 2003
Messages
220
Location
CA
Hi,

I am trying to have a text box show valur like this "001" ,"002", "003" without the quotations...I always want it to show 3 digits. The data type for the feild is set to text.

How can i do this?

Thanks,

Sylvain
 
Have you tried a "000" format ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
yes, but then i have code that changes it on a button click like this

Me.txtPurchaseOrderNumber = Me.txtPurchaseOrderNumber + 1
and it looses the "00"



Thanks,

Sylvain
 
The data type for the feild is set to text
Me!txtPurchaseOrderNumber = Format(Val(Me!txtPurchaseOrderNumber) + 1, "000")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
thanks...
that worked out fine.

Thanks,

Sylvain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top