View Single Post
  #1 (permalink)  
Old March 2nd, 2009, 02:11 PM
winkle winkle is offline
Registered User
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question 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?
Reply With Quote