Forum Moderators: open
Looking for a way to format my numbers to 2 decimal places as I build my table, can
Combining :
formatnumber(recordset("Price"),2)
response.write "<td>" & recordset("Price") & "</td>"
into :
response.write "<td>" & formatnumber(recordset("Price"),2) & "</td>"
work?
Also would like to highlight cell or row background based on numbers value.
Any ideas would help.
Thanks,
SW
as for changing the color of the row you can make a function that will dynamically change the class of the cell such as:
response.write "<td class=" & FormatCellColor(recordset("Price")) & ">" & formatcurrency(recordset("Price")) & "</td>"
function FormatCellColor(ByVal myVal)
If myVal > 0 then
FormatCellColor = "GreyCell"
Else
FormatCellColor = "RedCell"
End If
end function
that is one way to do it.