Hello,

I have a userform with a listview control that displays data fetched from an MS-Access database based on user defined queries. I have code that sorts the resulting data in the listview based on double-clicking the column heading, but the data is being sorted as a string as opposed to numeric even if the resultset data is numeric in the database. I've tried the following approach but it doesn't seem to work. Anyone have a thought on how to approach this?

rst1 is an ADODB recordset


[code]
' This doesn't work

ListView1.ListItems.clear
While Not rst1.EOF
With ListView1.ListItems.Add(, , Format(CLng(rst1!origBalance), "0,000"))
.ListSubItems.Add , , CLng(rst1!currentBalance)
rst1.MoveNext
End With
Wend

[code]

Thanks for your help

Rich