Runtime Error from Chapter 11 Code
Using the Dynamic Ribbons.accdb database for Chapter 11, I set the ribbon for frmCustomers to rbnFormNav. The ribbon displays but runtime error 91 (Object variable or with block variable not set) message appears in the following sub:
Private Sub InvalidateNavControls()
With gobjRibbon
.InvalidateControl "lblNav"
.InvalidateControl "btnNavFirst"
.InvalidateControl "btnNavPrev"
.InvalidateControl "btnNavNext"
.InvalidateControl "btnNavLast"
End With
End Sub
The message occurs when the form frmCustomers is opened or when btnNavNext is pressed. I also got the same error in my own database when I duplicated the code.
What am I missing?
|