So I've never used VB in a report before, but I'm taking a shot at it.
Just as a test to see if I'm doing it right, I'm trying to set up an
invoice where a particular rectangle will change from white to red
depending if the customer has more than one order on file.
I have my query set up, and it's working just fine.
Of the five dummy invoices I have set up, I have the following values
calculated for CountofOrderID, and would expect the following colors
for the rectangle:
3 - Red
1 - White
2 - Red
2 - Red
3 - Red
However, when I view the reports, what I actually get is this:
3 - Red
1 - Red
2 - Red
2 - Red
3 - Red
The underlying code I have is:
Private Sub Renewal_Indicator(Cancel As Integer)
If [CountOfOrderID] 1 Then
RenewalHide.BackColor = 255
Else
RenewalHide.BackColor = 16777215
End If
End Sub
What am I doing wrong? Thanks!