Results 1 to 2 of 2
  1. #1
    mcucino is offline Advanced Beginner
    Windows 8 Access 2016
    Join Date
    Jul 2017
    Location
    Providence, RI
    Posts
    74

    Menu tabs missing

    Hi All, I'm getting runtime error 2046 "The command or action windowunhide is not available" when I try to run the line of code "DoCmd.RunCommand acCmdWindowUnhide". One of the lines of code (presumably DoCmd.RunCommand acCmdWindowHide) hid most of the menu tabs and almost everything under the "file" tab (except print).



    Code:
    Public Sub DeveloperMode(IsDeveloper As Boolean)
    Dim i As Integer
    If IsDeveloper Then        DoCmd.ShowToolbar "Ribbon", acToolbarYes
            DoCmd.SelectObject acTable, , True
            DoCmd.RunCommand acCmdWindowUnhide
            Application.SetOption "Show Status Bar", True
            For i = 1 To CommandBars.Count
                CommandBars(i).Enabled = True
            Next i
        Else
            DoCmd.ShowToolbar "Ribbon", acToolbarNo
            DoCmd.NavigateTo "acNavigationCategoryObjectType"
            DoCmd.RunCommand acCmdWindowHide
            Application.SetOption "Show Status Bar", False
            For i = 1 To CommandBars.Count
                CommandBars(i).Enabled = False
            Next i
        End If
    end sub
    EDIT: I can get them back easily by opening the database with the shift key, but I need to be able to go back and forth

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    try

    call docmd.seletobject(actable,,true)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Menu accde access runtime 2010 without tabs?
    By BrightSoftware in forum Access
    Replies: 17
    Last Post: 09-12-2016, 06:20 AM
  2. Replies: 6
    Last Post: 12-03-2013, 02:59 AM
  3. Menu with multiple sub menu's
    By Simtech76 in forum Forms
    Replies: 1
    Last Post: 04-30-2013, 02:30 PM
  4. Replies: 0
    Last Post: 09-25-2012, 09:16 AM
  5. Missing menu item Package and Distribute
    By Wayne311 in forum Access
    Replies: 3
    Last Post: 07-28-2011, 04:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums