Hello,
I want a field from database when returned to ASP page to display in Currency. I have tried FormatCurrency, but cannot get it to work. I would assume there is an easy way to display the data returned in Currency Format. Any help would be appreciated.
This is the error I receive.
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/AIR/results.asp, line 67
Response.Write oRec "FormatCurrency(Deposit_Amount,2)"
--------------------^
Here is the code:
Response.Write ("<CENTER><B><FONT SIZE=4 COLOR=Blue>Here is your Current Information.</FONT></B><P>")
Response.Write "<TR BGCOLOR=""#00ccff"">"
For i = 0 to oRec.Fields.Count - 1
Response.Write "<TH><FONT FACE=""ARIAL"" SIZE=""2"">" & oRec.Fields(i).Name & "</FONT></TH>"
Next
Response.write "</TR>"
' -- Now output the contents of the Recordset
oRec.MoveFirst %>
<%Do While Not oRec.EOF %>
<tr><td><% Response.Write oRec("Patient_Name") %></td>
<td><% Response.Write oRec("Date_of_Service") %></td>
<td><% Response.Write oRec("Claim_Number") %></td>
<td><% Response.Write oRec("Deposit_Date") %></td>
<td><% Response.Write oRec "FormatCurrency(Deposit_Amount,2)" %></td>
<td><% Response.Write oRec("Account_Number") %></td></tr>
<%
oRec.MoveNext
Loop
%>
<%
oRec.Close
set oRec = Nothing
oConn.Close
set oConn = Nothing
%>
</TABLE>
<p><small><a href="/Air/logoff.asp">Click Here to Logout</a></small></p>
</BODY>
</HTML>
I want a field from database when returned to ASP page to display in Currency. I have tried FormatCurrency, but cannot get it to work. I would assume there is an easy way to display the data returned in Currency Format. Any help would be appreciated.
This is the error I receive.
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/AIR/results.asp, line 67
Response.Write oRec "FormatCurrency(Deposit_Amount,2)"
--------------------^
Here is the code:
Response.Write ("<CENTER><B><FONT SIZE=4 COLOR=Blue>Here is your Current Information.</FONT></B><P>")
Response.Write "<TR BGCOLOR=""#00ccff"">"
For i = 0 to oRec.Fields.Count - 1
Response.Write "<TH><FONT FACE=""ARIAL"" SIZE=""2"">" & oRec.Fields(i).Name & "</FONT></TH>"
Next
Response.write "</TR>"
' -- Now output the contents of the Recordset
oRec.MoveFirst %>
<%Do While Not oRec.EOF %>
<tr><td><% Response.Write oRec("Patient_Name") %></td>
<td><% Response.Write oRec("Date_of_Service") %></td>
<td><% Response.Write oRec("Claim_Number") %></td>
<td><% Response.Write oRec("Deposit_Date") %></td>
<td><% Response.Write oRec "FormatCurrency(Deposit_Amount,2)" %></td>
<td><% Response.Write oRec("Account_Number") %></td></tr>
<%
oRec.MoveNext
Loop
%>
<%
oRec.Close
set oRec = Nothing
oConn.Close
set oConn = Nothing
%>
</TABLE>
<p><small><a href="/Air/logoff.asp">Click Here to Logout</a></small></p>
</BODY>
</HTML>