Hi Accessers,
I am attempting to make the code function well to no avail. The form consists of a subform (datasheet). The Allow properties is for the subform. What am I writing incorrectly?!
Code:
Private Sub Form_Open(Cancel As Integer)On Error GoTo Err_Form_Open
If User.AccessID = 1 Then
Me.Form.AllowAdditions = True
Me.Form.AllowDeletions = True
Me.Form.AllowEdits = True
ElseIf User.AccessID = 2 Then
Me.Form.AllowAdditions = True
Me.Form.AllowDeletions = False
Me.Form.AllowEdits = False
Else
Me.Form.AllowAdditions = False
Me.Form.AllowDeletions = False
Me.Form.AllowEdits = False
End If
Exit_Form_Open:
Exit Sub
Err_Form_Open:
MsgBox Err.Description
Me.Visible = True
Resume Exit_Form_Open
End Sub
SPECS:
Access 2010
64-bit system
Thanks for the help!