Page 1 of 4 123 ... LastLast
Results 1 to 15 of 57
  1. #1
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Preview then don't allow print (Access 2003 SP2)

    Doesn't that rather defeat the purpose of allowing them to preview? Does the user have permission to show and hide toolbars? If not, you could have a custom toolbar that you loaded with the report preview instead of the default toolbar and that didn't include the print functionality.
    Charlotte

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Preview then don't allow print (Access 2003 SP2)

    Is it possible when you preview a report to prevent a user from printing it?

    If so, can you turn it on for some users and turn it off for other users?

    I also notice that when you preview a report the right mouse button allows the user to print, can this option (the print option) be made invisible?

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Preview then don't allow print (Access 2003 SP2)

    The user has requested that it be non-printable for security reasons in that they don't want reports left lying around.

    Can the right click options in the print previewer window be suppressed? I asked this in the previous post.

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

    Re: Preview then don't allow print (Access 2003 SP2)

    You can create a blank custom toolbar, select it in the Toolbars tab of the Customize dialog, click Properties and change the type to a popup. Click OK and close the Customize dialog.
    Set the Shortcut Menubar property of the report in the Other tab of Properties to the name of the blank popup menu.

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

    Re: Preview then don't allow print (Access 2003 SP2)

    BTW, the user could still use the PrintScreen key or a screen capture utility to grab pages of the report and print them from another application.

  6. #6
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Preview then don't allow print (Access 2003 SP2)

    That's good, but what I have found now is that any database I go into I have lost the print icon in the toolbar along the top of the screen just under the File/Edit... toolbar.

    How can I get that print icon back?

    How do you delete the custom toolbar that I have just created?

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

    Re: Preview then don't allow print (Access 2003 SP2)

    Select Tools | Customize...
    You can select the Standard toolbar in the Toolbars tab and click Reset. This will remove ALL changes to the Standard toolbar and restore it to the default.
    Or you can activate the Commands tab, select File in the list of Categories and drage Print from the list of Commands to the Standard toolbar.

    To remove the custom popup menu, select Shortcut Menus in the Toolbars tab and tick its check box.
    A temporary toolbar will be displayed.
    Your popup memu will be listed under Custom.
    Right-click it and select Properties.
    Set the Type to Toolbar.
    It will now be listed in the Toolbars tab again, and you can delete it from there.

  8. #8
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Preview then don't allow print (Access 2003 SP2)

    As you can see I have never been into toolbars before.
    What is the Standard toolbar called that's in the Toolbars tab in the Customize menu for me to click reset?

    When I try to right click to select properties of the Custom icon in the temporary toolbar I don't get a dropdown list where I can select properties. Help.

    Before we go any further I have to ask, can this be done via VBA as it will apply to some users and not others.

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

    Re: Preview then don't allow print (Access 2003 SP2)

    Sorry, that's what you get when you reply without actually testing things. <img src=/S/stupidme.gif border=0 alt=stupidme width=30 height=30>

    1) I was thinking about the other Office applications. Access doesn't have a "standard" toolbar, it has various toolbars for tables, forms, reports etc. The one you need to reset is the Print Preview toolbar.
    2) Select ANY toolbar in the Customize dialog and click Properties. Then select your custom toolbar from the "Selected Toolbar" dropdown. NOW you can set its Type.
    3) There is an extensive object model for CommandBars (the umbrella name for menu bars, toolbars and popup menus). You can create, modify and delete toolbars, toolbar buttons etc. in code. You'll find examples scattered throughout the various forums in the Office section.

  10. #10
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Preview then don't allow print (Access 2003 SP2)

    Thanks for that, the print icon has returned to the top toolbar.

    Do you have any specific posts I should look at? I will search the various forums and see what I can find.

    I have used the following command to make the Print Preview toolbars invisible for the duration of the preview of the report, but this does not take into account the right click options which show an option to print.

    CommandBars("Print Preview").Visible = False

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

    Re: Preview then don't allow print (Access 2003 SP2)

    You can use

    CommandBars("Print Preview Popup").Enabled = False

    to disable the right-click menu (and ...= True to enable it again).

    What else would you like to do with commandbars in code? It's hard to recommend a post in general.

  12. #12
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Preview then don't allow print (Access 2003 SP2)

    That's just great, it does just what I want it to do.

    However (there's always a but), when I preview a report and I right click on the File/Edit/View... line I get the following options in the dropdown list.
    Print Preview
    Web
    Custom1 (I still need to delete this)
    Customise

    When I click on Print Preview the Print Preview toolbar returns and I can then select the print icon again. Is there a way to disable this print icon in the Print PReview list?

  13. #13
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Preview then don't allow print (Access 2003 SP2)

    I think I now have it, I used the following command and it seems to have disabled the PRint PReview toolbar.

    CommandBars("Print Preview").Enable = False

    Thanks for your help Hans, you have done it again.

  14. #14
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Preview then don't allow print (Access 2003 SP2)

    The 3 commands I have used are:

    CommandBars("Print Preview").Visible = False
    CommandBars("Print Preview").Enabled = False
    CommandBars("Print Preview Popup").Enabled = False

    I have used these in a report OnOpen event.

    I have since used these in a form that is executed when the database is first opened and it works. It only resets itself when you exit the database and come back in again.
    This means that depending on who logs on to the database I can Enable or Disable the Print PReview toolbar, and this is exactly what I wanted to achieve.

    Thanks again Hans for taking the time and effort and persistance to help me with this and to enlighten me a little on Toolbars.

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

    Re: Preview then don't allow print (Access 2003 SP2)

    You can delete the Custom1 tooolbar from the Immediate window:

    CommandBars("Custom1").Delete

    You can disable the Print button in code:

    CommandBars("Print Preview").Controls("Print").Enabled = False

    or hide it by setting .Visible = False. Don't forget to set it to True again when you close the report.

Page 1 of 4 123 ... LastLast

Posting Permissions

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