p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Expert Access 2007 Programming ISBN 978-0-470-17402-9 (http://p2p.wrox.com/forumdisplay.php?f=371)
-   -   Runtime Error from Chapter 11 Code (http://p2p.wrox.com/showthread.php?t=73023)

winkle March 2nd, 2009 02:11 PM

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?

boblarson April 22nd, 2009 02:41 PM

I know that this is over a month old, but I thought I would try answering for future use.

It would appear that gobjRibbon has not been instantiated and therefore you get the Error 91.


All times are GMT -4. The time now is 02:36 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.