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

dynamically formating a listview based on data type

Status
Not open for further replies.

AppDev76

Programmer
Jun 8, 2004
65
US
Hi,
i have a listview that I populate using a recordset.
I need to format some fields,for example I have a currency field and a percentage field.
How can I get the datatype of the retuned field in the recordset so that I can format the field properly.

Thanks
 
One way...
Use the format command in the SELECT statement...

SELECT Format(MySales, "$#,#0.00"), Format(MyMargin*100, "#00.0%")

or

strMyText = Format(MySales, "$#,#0.00")

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top