Right-click on report preview not providing options window (1 Viewer)

PaulA

Registered User.
Local time
Today, 17:09
Joined
Jul 17, 2001
Messages
416
Hi, all -

I have a A2013 multi-user application where the security log in process hides the navigation pain and tool bar functions except for the basics. This can be bypassed by the shift key. I got this functionality online and involved changing some settings for the database and creating a table that provides calls the appropriate toolbars.

I've discovered that when one logs without bypassing these functions, then generates a report in preview, one can't do anything with the preview! If I right-click on the preview, no window appears for various functions like changing the view, printing, exporting, etc. If I bypass the security process with the shift key, the right-click window appears fine when right-clicking on the report preview.

I need our regular users to be able to print, export, etc.

Any thoughts of how to bring back the right-click window without eliminating the other security?

Thanks
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:09
Joined
May 7, 2009
Messages
19,230
you need to create a Macro for the menu.
but first you need to create a function for the functionality of your menu.
for user to be able to Print, create a Public function in a Module that will do this:

Public Function fnPrintOut()
DoCmd.PrintOut
End Sub

Public Function fnCopy()
DoCmd.RunCommand acCmdCopy
End Function

Public Function fnPaste()
Docmd.RunCommand acCmdPaste
End Function


there are two Macros you need to make.
one the the available options for your menu, like if you want user to Copy, Paste, Print.
the second is the macro that will display this menu items.

the menu items first:

create a macro for line item.
put the code in a submacro.
then inside the submacro call its functionality (the function you made).
if it is only a messagebox no need to create a function for it.
this is a sample (say mcrMenuItem).

Submacro: Copy
RunCode
Function Name: fnCopy()
End Submacro
Submacro: Paste
RunCode
Function Name: fnPaste()
End Submacro
Submacro: Print
RunCode
Function Name: fnPrint()
End Submacro


now create a Macro that will call this macro.
let's call this new macro mcrMenu.

Addmenu
Menu Name: myMenu
Menu Macro Name: mcrMenuItem


next open your form/report in design view.
on its Property Sheet->Other

Shortcut Menu Bar: mcrMenu
 

PaulA

Registered User.
Local time
Today, 17:09
Joined
Jul 17, 2001
Messages
416
Thanks, arnelgp. This is good to have.

Turns out the actual answer was a lot simpler -

The preview was in pop-up mode, which really isn't necessary for our needs. i just set that to "No" and the ribbon had what was needed.

Still interesting that the right-click was deactivated for regular logon status for the preview pop-up mode.
 

isladogs

MVP / VIP
Local time
Today, 17:09
Joined
Jan 14, 2017
Messages
18,213
If you want even more control over your application, have a look at this example in the code repository:
Show/hide application window, navigation pane, ribbon, taskbar

This shows lots of ways of controlling the Access application window including the ribbon.
For example, it shows how the print preview ribbon can be displayed whilst a report is open then hidden when it is closed again
 

Users who are viewing this thread

Top Bottom