Results 1 to 2 of 2
  1. #1
    JackieEVSC is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Oct 2011
    Posts
    70

    Help with module to set report/form toolbars


    I needed to remove the ribbon from all forms and display the ribbon on all reports. I was able to create a (time-consuming) workaround by adding code to every form (on activate) and every report (on activate and on deactivate) to display/hide the ribbon. I had to do this for 21 forms and 48 reports. I was in a crunch and was okay doing this one time, but I don't want to have to do this every time I send out a new frontend to users.


    Someone on here suggested I make this a function and pass the form/report name to a standard module. I have had no training in vba. I can generally take someone else's code and tweak it to fit my needs, but I don't know enough to write it on my own. Can someone help me or point me to a resource that can show me how to code such a module? Thanks.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    You want to hide the Ribbon for forms but not for reports? It only takes one line of code to hide the Ribbon. What is it that you believe you need to place into a function? Are you looking for a way to monitor OnActivate and OnDeactivate for all open Forms and Reports? I suspect the only way to do this is to create a Custom Class as a Factory for your forms and reports. Then a specific menu would use the class to open forms and Reports.

    Seems like a lot of work when the conventional approach would be to always hide the Ribbon or create custom ribbons using XML.

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

Similar Threads

  1. Toolbars
    By surfdragon in forum Access
    Replies: 2
    Last Post: 07-07-2016, 05:21 AM
  2. Getting Variable from Module to Report
    By dylcon in forum Modules
    Replies: 3
    Last Post: 02-14-2014, 03:43 PM
  3. Replies: 4
    Last Post: 05-16-2011, 04:58 PM
  4. Allow Built-in Toolbars
    By DianeG in forum Access
    Replies: 0
    Last Post: 08-26-2010, 06:04 PM
  5. Customized Toolbars
    By croydon in forum Programming
    Replies: 4
    Last Post: 10-07-2009, 11:05 AM

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