Results 1 to 3 of 3
  1. #1
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480

    VBA code menus

    Alright, So I am trying to prepare myself for a rolling update of windows 7 machines running access 2010.

    My current program is running on 2003, and all is happy in this world.. However, when opened in 2010.. the navigation pane is showing, displaying sensitive back end files. I have custom menus setup, so the users should not be seeing any access menus at all.

    I am thinking the setting from 2003, into 2010 is not sticking and letting default menus and the navigation pane load... Is there a way I can have the menu's set to custom1 "Blank menus" through the vba code? This might stick better then the "current database" or "startup" options...

    I also found this bit of code, and it seems to work (Hides the Navigation pane).. however it re positions my form to the center of the page... very odd.. normally its at the top left, set as do.maximize.

    Code:
    'DoCmd.RunCommand acCmdWindowHide
    'DoCmd.NavigateTo “acNavigationCategoryObjectType”
    Here is my form current event..

    Code:
    Private Sub Form_Current()
    On Error Resume Next
    
    
    Dim oTD As DAO.Database
    
    
    Application.CommandBars.DisableAskAQuestionDropdown = True
    DoCmd.Maximize
    
    
    Application.CommandBars.DisableCustomize = True
    'DoCmd.RunCommand acCmdWindowHide
    'DoCmd.NavigateTo “acNavigationCategoryObjectType”
    
    
    
    
    
    
      Me.lblUesr.Caption = Environ("username")
      DoCmd.ShowToolbar "Ribbon", acToolbarNo
    
    
    Set oTD = CurrentDb.TableDefs("tblCred")
    If Err.Number = 3265 Then
      DoCmd.TransferDatabase acLink, "Microsoft Access", Environ("userprofile") & "\My Documents\Lift\Credentials.mdb", acTable, "tblCred", "tblCred"
      DoCmd.TransferDatabase acLink, "Microsoft Access", Environ("userprofile") & "\My Documents\Lift\Credentials.mdb", acTable, "tblWebCreds", "tblWebCreds"
    End If
    
    
    End Sub


  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    Hmm its not... I guess that is part of my problem, It so hard to say what is causing the behavior.

    Something odd, when I open up the program (Designed in 2003 but being opened in 2010) without shift click, it loads to the normal form..and it leaves the arrow to drop down the ribbon.. even though I have "DoCmd.ShowToolbar "Ribbon", acToolbarNo" Once I was in there, I was able to go into the privacy settings of the current database and see that it was not set to custom for the menus.. it was set to default.

    In access 2003, when opened it loads the custom Menu, and hides all the Access menu items. Seems like that setting is not sticking from access 2003 into 2010.

    I will look into the links later on this evening, Currently my head is killing me lol. Thank you for your assistance on this issue again.

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

Similar Threads

  1. Problem with Menus
    By Interista in forum Access
    Replies: 5
    Last Post: 11-14-2011, 09:13 AM
  2. Access Menus
    By FadingAPE in forum Access
    Replies: 5
    Last Post: 11-16-2010, 09:11 AM
  3. Dropdown menus
    By Mclaren in forum Forms
    Replies: 2
    Last Post: 08-17-2010, 12:30 PM
  4. menus are lost
    By eddwads in forum Access
    Replies: 2
    Last Post: 01-08-2010, 08:34 PM
  5. Drop Down Menus
    By iambia in forum Access
    Replies: 1
    Last Post: 01-25-2008, 02:05 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