Solved

Method 'Controls' of object commandbar popup failed

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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…

759 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