Evidently Access 2010 does not fire the OnPrint or OnFormat events for Report View. I have a report that is semi-interactive in that some records should display a "Process" or "Deny" button. I need it to be in Report View so that the buttons are clickable.
I want to run this code in the report's OnFormat event:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Nz(Me.Status, "") = "" Then
Me.cmdProcess.Visible = True
Me.cmdDeny.Visible = True
Else
Me.cmdProcess.Visible = False
Me.cmdDeny.Visible = False
End If
End Sub
Looking around, the only event that fires for Report View that might be useful is the OnPaint event. But Access does not allow changing the .Visible property through the OnPaint event. I've done some searching, but cannot find a solution. If no solution is found, I'll have to have the buttons always visible and then just check conditions OnClick, but that is a last resort.
Any advice or help would be appreciated.