Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Expert Access 2007 Programming ISBN 978-0-470-17402-9
This is the forum to discuss the Wrox book Expert Access 2007 Programming by Rob Cooper, Michael Tucker; ISBN: 9780470174029
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Expert Access 2007 Programming ISBN 978-0-470-17402-9 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 2nd, 2009, 02:11 PM
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?
 
Old April 22nd, 2009, 02:41 PM
Authorized User
 
Join Date: Jul 2008
Location: Portland, OR, USA.
Posts: 38
Thanks: 1
Thanked 2 Times in 2 Posts
Default

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.
__________________
Thanks,

Bob Larson
Access MVP (2008-2010, 2011)
Free Access tutorials, samples, tools




Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in Chapter 11 Sample Code josevi BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 1 February 1st, 2008 01:43 PM
Where is source code for Chapter 11? benethridge BOOK: Professional Java Development with the Spring Framework 1 September 5th, 2006 08:58 PM
Chapter 11 Code Problems vbswshare BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 3 April 9th, 2006 08:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.