S
scott
Below is a snipplet of code that gets a recordset. I'm trying to output to a
text file and keep my columns of data straight by using tabs. Because of the
length of records in the field objRS!sShift, the vbTab code wasn't lining my
column correctly, so I used the Format() function with the "@@@@@@"
parameter and my data from the objRS!sShift now right-aligns.
My new problem is I have a new field called "percentData" that is a percent
that I need to display as 54.62% for example. Without the Format() function,
the raw output of this field looks like 0.5462625 for example.
I can't seem to find a website that shows the different parameters for the
Format() function that could help me format my percent properly.
Anyone know what parameters to use with Format() to format a percent? Any
web links would be appreciated.
CODE:
sTableRecord = objRS!ID & Chr(9) & Chr(9) & "" & _
objRS!field1 & "" & vbTab & "" & _
Format(objRS!dtDateField, "mm/dd/yyyy") & "" &
vbTab & vbTab & _
Format(objRS!sShift, "@@@@@@") & vbCrLf
text file and keep my columns of data straight by using tabs. Because of the
length of records in the field objRS!sShift, the vbTab code wasn't lining my
column correctly, so I used the Format() function with the "@@@@@@"
parameter and my data from the objRS!sShift now right-aligns.
My new problem is I have a new field called "percentData" that is a percent
that I need to display as 54.62% for example. Without the Format() function,
the raw output of this field looks like 0.5462625 for example.
I can't seem to find a website that shows the different parameters for the
Format() function that could help me format my percent properly.
Anyone know what parameters to use with Format() to format a percent? Any
web links would be appreciated.
CODE:
sTableRecord = objRS!ID & Chr(9) & Chr(9) & "" & _
objRS!field1 & "" & vbTab & "" & _
Format(objRS!dtDateField, "mm/dd/yyyy") & "" &
vbTab & vbTab & _
Format(objRS!sShift, "@@@@@@") & vbCrLf