Getting Type mismatch: '[string: ""]'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cgoodwinjr
    New Member
    • Aug 2014
    • 1

    Getting Type mismatch: '[string: ""]'

    I'm getting this error for the last line of this code:

    Code:
    Dim ComKey
    Dim ComCode, SubComCode
    Dim SelectedCompanys
    	
    ComCode = rpt.Sections("Detail").Controls("COM_CompanyCode12").DataValue
    	SubComCode = rpt.Sections("Detail").Controls("SUBCOM_SubsidiaryCode12").DataValue
    	
    	ComKey = ComCode & "_"
    	If SubComCode <> "" Then
    		ComKey = ComKey & SubComCode & "_"
    	End If
    
    	' Totals were not being accumulated correctly by default, so must keep track of them manually
    	vars.StrVar(ComKey & "_GROUPTOT") = vars.StrVar(ComKey & "_GROUPTOT") + rpt.Sections("Detail").Controls("GLFormula1").DataValue
    Last edited by Rabbit; Aug 21 '14, 09:48 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3662

    #2
    cgoodwinjr,

    Are you sure that "vars.StrVar(Co mKey & "_GROUPTOT" )" actually has a value in this expression?

    Comment

    Working...