hi June7. I hadn't picked up on that. Funny, in my program I have the correct columns referenced (as per below). I think after pasting the code yesterday, I must have made that change. Although the correct column references exist on my form, the code is still allowing the user to delete the record
If Forms!frmLogin!cmbUser.Column(3) = 4 Then If Forms!frmLogin!cmbUser.Column(4) = "OB01" Then
With Me
.DataEntry = True
.AllowEdits = True
.AllowDeletions = False
.AllowAdditions = True
.AllowFilters = True
End With
Else
MsgBox "You are not authorized to view this form"
Cancel = True
DoCmd.Close acForm, "ObstetricsForm", acSaveNo
End If
Else
If Forms!frmLogin!cmbUser.Column(4) = "All" Then If Forms!frmLogin!cmbUser.Column(3)= 1 Then
With Me
.DataEntry = True
.AllowEdits = True
.AllowDeletions = True
.AllowAdditions = True
.AllowFilters = True
End With
..
End If
End If