How do you popluate a textbox with a sum of revenue data?


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
txtTotalRevenue.Text = “0.00”
end if
end if


This should work if you change FormatType of the textbox to ftCurrency.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) news and product updates!

You have Successfully Subscribed!