I have a form that opens to read-only based on user role. I need to be able to use a Lookup List (Combo box) to still be used to search for records as well as a lookup list that filters records but they don't work in the read-only mode.
The two controls that i want to still be able to use are cboFilterDept and the Combo329.
Here is a snippet of the code i am trying to use to do this...
================================================== ===============================
If (DLookup("strUserRole", "tblUserRoles", "[strUserID]='" & Forms![_frmLoginVerify]!txtLoginName.Value & "'")) = "Admin" Then
DoCmd.OpenForm "frmAgreements_Edit"
ElseIf (DLookup("strUserRole", "tblUserRoles", "[strUserID]='" & Forms![_frmLoginVerify]!txtLoginName.Value & "'")) = "MC Reporting" Then
DoCmd.OpenForm "frmAgreements_Edit", acNormal, , , acFormReadOnly
Forms!frmAgreements_Edit.Controls("cmdNewAgreement ").Visible = False
Forms!frmAgreements_Edit.Controls("cboFilterDept") .AllowEdits = True
Forms!frmAgreements_Edit.Controls("Combo329").Allo wEdits = True
Else
MsgBox "Sorry, you do not have permission to use this area of the database", vbOKOnly, _
"Permissions Check"
End If
================================================== ===================================
Any help would be appreciated.