Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1838
  • Last Modified:

Method 'Controls' of object commandbar popup failed

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
snyperj
Asked:
snyperj
  • 2
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
snyperjAuthor Commented:
each user runs their own  linked fe....  I will check out the kb article....
0
 
Jeffrey CoachmanCommented:
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
 
snyperjAuthor Commented:
reinstall of office resolved it.
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now