I have a report that uses the detail section to format the data for display in a footer section.
The data looks like this
ProviderId, Name, Month, year, mbrship
1111 John Smith 4 2014 200
1111 John Smith 5 2014 219
1111 John Smith 6 2014 217
The Report should display it like this
1111 John Smith
Apr 2014 May 2014 Jun 2014
200 219 217
It's actually more involved but this is the basis of the report. The complexity prevents me from using a simple crosstab.
The code behind the report has a couple of arrays defined and in the detail section there are the fields I need to build the arrays.
The code behind the form is as follows
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Select Case Me.CAPMONTH
Case Is = 4
If Left(Me.LOB, 1) = "C" Then
commmbrship(1) = commbrship(1) + txtMember
Else
srmbrship(1) = srmbrship(1) + Me.Member
End If
Case Is = 5
If Left(Me.LOB, 1) = "C" Then
commmbrship(2) = commbrship(2) + Me.Member
Else
srmbrship(2) = srmbrship(2) + Me.Member
End If
Case Is = 6
If Left(Me.LOB, 1) = "C" Then
commmbrship(3) = commbrship(3) + Me.Member
Else
srmbrship(3) = srmbrship(3) + Me.Member
End If
Case Is = 7
If Left(Me.LOB, 1) = "C" Then
commmbrship(4) = commbrship(4) + Me.Member
Else
srmbrship(4) = srmbrship(4) + Me.Member
End If
Case Is = 8
If Left(Me.LOB, 1) = "C" Then
commmbrship(5) = commbrship(5) + Me.Member
Else
srmbrship(5) = srmbrship(5) + Me.Member
End If
Case Is = 9
If Left(Me.LOB, 1) = "C" Then
commmbrship(6) = commbrship(6) + Me.Member
Else
srmbrship(6) = srmbrship(6) + Me.Member
End If
End Select
End Sub
The me.member is the field I'm trying to put into the arrays also named the textbox associated with that field as txtmember and tried it both ways. Everytime I try to compile I get the error
Sub or function not defined. I know that it's not a sub or function. There is a textbox with the field name assigned and the textbox.name defined. What am I missing here?