I have searched the forums and found a lot of answers to this question but I must be doing something wrong.
I have a report with an image named voided. The Report's record source is mastertable which has a field named void. If void is true the image should appear. If void is false the image should be hidden. In the reports Detail0 property sheet I have an event procedure for on format. Here is the code:
Code:
Private Sub Detail0_Format(Cancel As Integer, FormatCount As Integer)
If Me.Void = True Then
Me.voided.Visible = True
Else
Me.voided.Visible = False
End If
End Sub
When I run the report I get: Run-time Error 2465: Microsoft Access can't find the field 'Void' referred to in your expression. When I type in me. void shows up along with all of the other fields in the mastertable. If move the code to report on current, the error goes away but the image always shows. If the code is in Report.Load then I get the 2465 error.
What am I doing wrong?
PS Access 2016 64 bit on a windows 10 x64 machine, fully updated.