Solved

Method 'Controls' of object commandbar popup failed

Posted on 2011-03-04
4
1,734 Views
Last Modified: 2012-05-11
I am running the code below in the timer event of my startup form.   The code determines what menu items the user can see.

One user, and only one user, consistenly receives a "Method 'Controls' of object commandbar popup failed" error and is unable to get past it.

For everyone else it works fine.  

We have tried a complete reinstall of Office (2000) on the problem machine but the error continues.

The user can run the db on other machines with no problems.

Private Sub MenuLoad()

Application.CommandBars("Custom Main").Visible = True

    CommandBars("Custom Main").Controls("Data").Enabled = True
    CommandBars("Custom Main").Controls("Options").Enabled = True
    CommandBars("Custom Main").Controls("Reports").Enabled = True
    

    Select Case User.UserSYS_ACTIVITY
        Case 1 'enabled
            CommandBars("Custom Main").Controls("Options").Controls("System Activity Log").Visible = True
        Case Else
           CommandBars("Custom Main").Controls("Options").Controls("System Activity Log").Visible = False

    End Select

    Select Case User.UserEMP_RATES
        Case 1 'enabled
            CommandBars("Custom Main").Controls("Reports").Controls("Job Costing (Restricted)").Visible = True
        Case Else
           CommandBars("Custom Main").Controls("Reports").Controls("Job Costing (Restricted)").Visible = False
    End Select


    Select Case User.UserHELP_DESK
        Case 1 'enabled
            CommandBars("Custom Main").Controls("Data").Controls("Help Desk Call Center Link").Visible = True
        Case Else
           CommandBars("Custom Main").Controls("Data").Controls("Help Desk Call Center Link").Visible = False
    End Select



End Sub

Open in new window

0
Comment
Question by:snyperj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 35039664
The issue would be machine-specific, then.

Is Windows fully updated on that machine?

You might need to do a "deep" uninstall on Office in order to fully clean all files. This one claims to do it:

http://support.microsoft.com/kb/239938

Do all users share the same database, or does each user have their own copy of the frontend (the one with the forms, reports etc in it)?
0
 

Author Comment

by:snyperj
ID: 35040345
each user runs their own  linked fe....  I will check out the kb article....
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35059985
What if you eliminated the "Timer" as a variable here...
can you explain why this needs to be on the timer event
Why not put this code on the Open event?

...just curious

0
 

Author Closing Comment

by:snyperj
ID: 35133191
reinstall of office resolved it.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question