Question:
I am trying to run a query that will sum some revenue data and then just have the sum populate a textbox. I keep getting an error of Type Mismatch in Saleslogix. I am currently running 7.5.1. Can anyone tell me what I am doing wrong?
Here is the code that I am using:
strSQL = "Select SUM(Revenues) TotalRevenue from sysdba.ACCOUNT_REVENUE where ACCOUNTID = '"& strVal &"' AND FISCALYEAR = '"& strYear &"'"
objRS.Open strSQL, objSLXDB.Connection
if objrs.eof = false then
If objRS.Fields.Item("TotalRevenue").Value > 0 then ------- This is where the system is giving me the error message.
txtTotalRevenue.Text = objRS.fields.item("TotalRevenue").Value
else
txtTotalRevenue.Text = "0.00"
end if
end if
Answer:
This should work if you change FormatType of the textbox to ftCurrency.
About SalesLogix Support
|
|
Your SalesLogix Business Partner for SalesLogix Support. |