L
Lisab
I have several global variables that are of type INTEGER with simular names
and would like to reference them in code. for example my global variables
are named as follows: intPHOpen, intPHDAOpen, intPHTROpen
my code loopes through records; I want the record Type and Category (PH,
TR, DA) to determine which variable should have a value added to it.
I have a local variable called strVarName that is of Type STRING and my
code sets this string to the name of the globla variable that I want to
reference
I am having trouble in the SELECT CASE section of my code. There is where I
want to add value to the global variable (strVarName) . currently my code
looks like this
--------------------------------------
Do Until SourceRS.EOF
If SourceRS!Type = "M" Then
'add value to Multifamily open count
intMFOpen = intMFOpen + SourceRS!countvalue
strVarName = "intMF"
ElseIf SourceRS!Type = "P" Then
'add value to PublicHousing opencount
intPHOpen = intPHOpen + SourceRS!countvalue
strVarName = "intPH"
End If
Select Case SourceRS!Category
Case "DA"
strVarName = strVarName & "DAOpen"
strVarName.Value = strVarName.Value + SourceRS!countvalue
Case "TC"
Case "TR"
End Select
....
----------------------------
I am having problems in the section of code that says:
strVarName.value = strVarName.Value + SourceRS!CountValue
I know it is something simple I should do instead
note: at this point in the code strVarName = intPHDAOpen or intMFDAOpen
this is the name of my global variable that I want to add value to.
I also tried the following in my SELECT CASE statement. I declared
strVarName as VARIANT and glblVariable as VARIABLE
and would like to reference them in code. for example my global variables
are named as follows: intPHOpen, intPHDAOpen, intPHTROpen
my code loopes through records; I want the record Type and Category (PH,
TR, DA) to determine which variable should have a value added to it.
I have a local variable called strVarName that is of Type STRING and my
code sets this string to the name of the globla variable that I want to
reference
I am having trouble in the SELECT CASE section of my code. There is where I
want to add value to the global variable (strVarName) . currently my code
looks like this
--------------------------------------
Do Until SourceRS.EOF
If SourceRS!Type = "M" Then
'add value to Multifamily open count
intMFOpen = intMFOpen + SourceRS!countvalue
strVarName = "intMF"
ElseIf SourceRS!Type = "P" Then
'add value to PublicHousing opencount
intPHOpen = intPHOpen + SourceRS!countvalue
strVarName = "intPH"
End If
Select Case SourceRS!Category
Case "DA"
strVarName = strVarName & "DAOpen"
strVarName.Value = strVarName.Value + SourceRS!countvalue
Case "TC"
Case "TR"
End Select
....
----------------------------
I am having problems in the section of code that says:
strVarName.value = strVarName.Value + SourceRS!CountValue
I know it is something simple I should do instead
note: at this point in the code strVarName = intPHDAOpen or intMFDAOpen
this is the name of my global variable that I want to add value to.
I also tried the following in my SELECT CASE statement. I declared
strVarName as VARIANT and glblVariable as VARIABLE