Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    San Francisco, California, USA
    Posts
    358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    listbox menu options (Access 2002)

    Hi All!

    It's so frustrating when you know you know how to do something (and know you've done it but can't even remember when/where!!!) but your brain is getting old and braincells are hardening....Can someone please refresh my memory on this? Perhaps point out an example?

    I'd like to have a listbox list my reports. When the user right clicks on a report in the listbox, a popup menu appears that shows options of printing the report, previewing the report, or viewing the related data table.

    Grrr, I know I've done this before!!! (Afterthought: maybe it was in VB, which is why I can't figure out how to do it in Acces???) TIA,

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

    Re: listbox menu options (Access 2002)

    You can adapt the code from How to fill a list box or a combo box with database object names to fill a list box with the names of all reports in the database.

    You can create a custom popup menu using Tools | Customize... (create a custom toolbar, then set its type to Popup) or in VBA, and set the ShortcutMenuBar property of the list box to the name of your custom context menu.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    San Francisco, California, USA
    Posts
    358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: listbox menu options (Access 2002)

    Hi Hans!

    The first part I've got done :-) At least that much I remembered.

    The second part is what I'm having trouble setting up. You wouldn't happen to have links to examples for that?

    Thanks!

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

    Re: listbox menu options (Access 2002)

    Can't find any detailed ones (Microsoft Office Assistance: Create a toolbar is very short). If you explain in some detail what you want to accomplish and where you have problems, I'm sure someone here can help.

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    San Francisco, California, USA
    Posts
    358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: listbox menu options (Access 2002)

    Thanks, Hans. Drank an extra cup of coffee and woke my brain up. Made a custom menu, set it to popup, moved my subs to a module and made them functions and good to go. Sometimes I just need someone to shake my brain.

Posting Permissions

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