Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Right click menu's in Access (Access 97 SR2/VB6)

    Im having trouble finding information about custom menu's in Access (using VBA) and VB.

    I know I can create a menu using the features in Access, but I don't know how to then call the menu on an event.

    I have a 3rd party piece of software, so the menu doesn't automatically appear. I do have an "on right click" event and thought I could prompt a menu to appear in that - no luck so far though.

    Would any one know any good sources of information for creating and displaying menus? Im currently attempting to find some info on MSDN but its knowing what to type to find the results!

    Any help would be very much appreciated, thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Right click menu's in Access (Access 97 SR2/VB6)

    In Access, you can set the Shortcut Menu Bar property of a form or report to the name of a custom popup menu. This will make the custom menu pop up automatically if the user right-clicks the form or report; you don't need code for that.

    You don't provide any details about the third-party piece of software, so it is impossible to say anything about that; I don't even know whether this is in Access, or VB6.

  3. #3
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Right click menu's in Access (Access 97 SR2/VB6)

    Sorry Hans, I initially planned on keeping it simple with the question "Can you display a shortcut menu on a right click event in VBA" but thought i'd explain what I was doing as well.
    Im programming in VBA, but it may be converted to VB 6 at some point, so im trying to make modules etc that work on both or can be easily converted.
    I am using Infragistics Data Explorer (http://www.infragistics.com) which is basically a treeview and listview component set up to work like Windows Explorer.

    I tried the Shortcut Menu Bar property, but, the right click menu does not get displayed when right clicking on a item within the component, so my menu appears everywhere except where I need it to.
    There is a right click event (ItemRightClick(ByVal Item As Object)), hence I thought I might be able to code the menu to display. So far i've used the showtoolbar command, but this doesn't work with shortcut menu's, so i'm still searching for the solution.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •