Here's one I really need help with. I have records in my proddtl table marked as inactive. I have a search with a checkbox labeled inactive. I have a useraccess table that sets permission to this checkbox and that's all working just fine. Users without access to inactive records cannot see those in the listbox. What I'd like to do is allow some users with higher level rights the ability to list, select and print those inactive records while others cannot.
The code I use to allow users to open inactive records is this:
Private Sub btnOpenSelected_Click()
If Globals.UserAccess("SetupSheet") = False Then
MsgBox ("You do not have Access!")
Else
DoCmd.OpenForm "SetupSheet", , , "[ID]=" & [SearchList]
End If
End Sub
I've tried my best to turn this into a DoCmd.Printout but I'm stuck on the criteria.
Or, should I build this into the Where Condition in the Print Macro I'm currently using? I tried shoehorninig an Active=Yes in there but can't get 'er done.
View attachment 81705