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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Numeric field text output

Status
Not open for further replies.

jaggar

Programmer
Jan 23, 2003
21
US
I have a field called hours which is numeric (009999.0). When I create a text file, the zeros are removed and the field is left justified. How do I keep the zeros in the text file?
 
Since it is a text file and you presumably won't be using it in calculations again, could you convert it to a string first?
CStr([MyNumericField])
 
Is their an SQL equivalence to the Visual Basic CStr(Mynumericfield)?
 
If you create your text file from a query, you can use the CStr() function by making it an expression. Instead of pulling MyNumericField down to the grid in Query Design view, put NameAsIWantItToAppearInTheReport: Cstr([MyNumericField]) in the Field row.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top