View Single Post
Old 09-14-2019, 06:58 AM   #17
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,467
Thanks: 68
Thanked 2,720 Times in 2,605 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Run code before close report

you need to save [Forms]![FomLogin]![txtDienstID] to a public variable, so you can access them in the report.
after logging in:
Code:
Tempvars.Add "allow_shortcut", (Instr(1, ",1,2,5,8", "," & [Forms]![FomLogin]![txtDienstID] & ",") > 0)
on each report, check this variable on its, Open event:
Code:
Private Sub Report_Open(Cancel As Integer)
If [Tempvars]![allow_shortcut] = False Then
    Me.ShortcutMenuBar = "menu_print"
End If
End Sub
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
scallebe (09-14-2019)