I am trying to have certain rectangles become visible or not based on the value of a calculated control in a report. However, it gives me Error 2424 and points to the calculated control Me.calcOverallRating as the problem. The control is available in the list after I type Me. and therefore is both a valid control and correctly typed.I'm using Access 2007 in compatability mode 2002/2003. I've tried running it in the On Current, On Load and On Open events of the report.
I've also put it in the On Format event of the section the control is on. The error goes away, but nothing happens. I put in the code Debug.Print and test text for each case but nothing shows up in the Immediate Window.
Any ideas why or how to fix this? Thanks in advance.
My code is as follows:
I've also put it in the On Format event of the section the control is on. The error goes away, but nothing happens. I put in the code Debug.Print and test text for each case but nothing shows up in the Immediate Window.
Any ideas why or how to fix this? Thanks in advance.
My code is as follows:
Code:
Select Case Me.calcOverallRating
Case 0
Me.boxDoesNot.Visible = True
Case 0.5 To 1.4
Me.boxMeets.Visible = True
Case 1.5 To 2.4
Me.boxExceeds.Visible = True
Case 2.5 To 3
Me.boxOutstanding.Visible = True
Case Else
Me.boxDoesNot.Visible = False
Me.boxMeets.Visible = False
Me.boxExceeds.Visible = False
Me.boxOutstanding.Visible = False
End Select
Last edited: