Solved

Method 'Controls' of object commandbar popup failed

Posted on 2011-03-04
4
1,675 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
  • 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now