G
Guest
I have a form that is being run by a query. The query name is qryPersonnel it
filters the records on who can see what. Easy so far and I know the next part
is too but I can't remember how to do it. What I am trying to do is if a
person from "support" or "admin" logs in they can view all records and
override the query specific.
The code in the open event of the form is as follows:
Private Sub Form_Open(Cancel As Integer)
[Duty Section].SetFocus
dValue = [Duty Section].Value
Me.AllowEdits = False
AddMember.Visible = False
Support.Visible = False
[temp].Visible = False
Me.AllowDeletions = False
[Authorize Purchase].Visible = False
If dValue = "Support" Then
Forms![Personnel]!AddMember.Visible = True
Forms![Personnel]!Support.Visible = True
[Authorize Purchase].Visible = True
Me.AllowEdits = True
End If
If dValue = "Admin" Then
Forms![Personnel]!EPR.Visible = True
Me.AllowDeletions = True
End If
End Sub
filters the records on who can see what. Easy so far and I know the next part
is too but I can't remember how to do it. What I am trying to do is if a
person from "support" or "admin" logs in they can view all records and
override the query specific.
The code in the open event of the form is as follows:
Private Sub Form_Open(Cancel As Integer)
[Duty Section].SetFocus
dValue = [Duty Section].Value
Me.AllowEdits = False
AddMember.Visible = False
Support.Visible = False
[temp].Visible = False
Me.AllowDeletions = False
[Authorize Purchase].Visible = False
If dValue = "Support" Then
Forms![Personnel]!AddMember.Visible = True
Forms![Personnel]!Support.Visible = True
[Authorize Purchase].Visible = True
Me.AllowEdits = True
End If
If dValue = "Admin" Then
Forms![Personnel]!EPR.Visible = True
Me.AllowDeletions = True
End If
End Sub