Results 1 to 8 of 8
  1. #1
    RMittelman is offline Advanced
    Windows 10 Access 2016
    Join Date
    Dec 2010
    Location
    Simi Valley, CA
    Posts
    211

    Post Print Preview Ribbon Tab Not Activating (Sometimes)

    Hi folks,

    I have modified my various Access databases to use a custom ribbon instead of the old-fashioned Switchboard form.
    I've gotten most everything to work, but there is a quirk:

    When I open a report in print preview mode, usually the Print Preview ribbon tab appears so it's easy to close the preview, export to Excel, etc.


    But sometimes that tab does not activate, and my custom ribbon tab stays active. When this happens, the Print Preview tab is there, just not activated, and I need to train my users to click that tab to open it.

    I thought I could put code in my application to activate that tab:
    Code:
    gRibbon.ActivateTab "myPrintPreviewTabID"
    DoCmd.OpenReport .......
    This may or may not work, and I instead may have to put the first command in the Report_Open event of each report.
    Either way, I need to know the ID of the Print Preview ribbon tab. I've googled around and can't seem to find it.

    Any ideas? Thanks...

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Maybe line 24 here:

    AccessControls.zip
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    RMittelman is offline Advanced
    Windows 10 Access 2016
    Join Date
    Dec 2010
    Location
    Simi Valley, CA
    Posts
    211
    Quote Originally Posted by Micron View Post
    Maybe line 24 here:

    AccessControls.zip
    Thanks Micron. That was the one. Couldn't just activate a built-in tab so need to do this:
    Code:
    If Not gRibbon Is Nothing Then
        gRibbon.ActivateTabMso "TabPrintPreviewAccess"
        DoCmd.RunReport ........
    End If
    Since I have SO many reports to run, I usually run them all from the same form, where I choose the report, enter the parameters, then run the report from VBA code. Therefore I only needed to put the new statements there once instead of having to do them in each report.

    Thanks again...

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    NP - glad you solved it. Wasn't sure if that was what you needed, and I get why you didn't find the info when searching. I found it only after many followed Google results. Thing is, they're available from M$ but I can't recall where. I have a whole set of such files that I downloaded from there.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    RMittelman is offline Advanced
    Windows 10 Access 2016
    Join Date
    Dec 2010
    Location
    Simi Valley, CA
    Posts
    211
    Quote Originally Posted by Micron View Post
    NP - glad you solved it. Wasn't sure if that was what you needed, and I get why you didn't find the info when searching. I found it only after many followed Google results. Thing is, they're available from M$ but I can't recall where. I have a whole set of such files that I downloaded from there.
    Thanks again. There is also a Word document that MS put out containing pictures and IDs for all of the button images. There's hundreds of them, and you need to go through them page by page to find image IDs for your custom buttons. Let me know if you need that, I can either send you a copy or search out the URL for it.

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Can you post the file name? I know it but might have lost it when my last pc died, so If I knew the filename it would be easier to figure out.
    I do have 32 files for other Office ribbons like the one I posted here.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    RMittelman is offline Advanced
    Windows 10 Access 2016
    Join Date
    Dec 2010
    Location
    Simi Valley, CA
    Posts
    211
    Quote Originally Posted by Micron View Post
    Can you post the file name? I know it but might have lost it when my last pc died, so If I knew the filename it would be easier to figure out.
    I do have 32 files for other Office ribbons like the one I posted here.
    It's called Office2010IconsGallery.docx
    Not sure where to find it, it's somewhere on Microsoft's documentation pages

  8. #8
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Searched but didn't find. Easy enough to fix - select name, right click, choose Search Google for Office2010IconsGallery and you're there. Thanks!
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 5
    Last Post: 09-16-2019, 01:12 AM
  2. Replies: 5
    Last Post: 07-29-2018, 09:09 AM
  3. Prevent Print Preview Ribbon activating?
    By DubCap01 in forum Access
    Replies: 5
    Last Post: 05-27-2015, 08:55 AM
  4. Replies: 5
    Last Post: 07-29-2014, 01:05 PM
  5. Replies: 6
    Last Post: 03-01-2014, 07:07 AM

Tags for this Thread

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