Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Access Delete Record Security

Avatar of Monterey
Monterey asked on
Microsoft Access
6 Comments1 Solution377 ViewsLast Modified:
I have a permissions question.  In my PO database, I have a Header form and a sub form to identify the items ordered.  I have put a delete button on the sub-form by line so that Items can be deleted.  Once the PO is set for approval, of course, the items cannot be deleted, but as long as the PO is in an "Entered" status (it hasn't been sent for approval), users can delete items.  I have given the "Full Data Users" group all rights to the table that populates the subform, but I still get a permissions error when trying to delete a record in the subform while the header is still in "Entered" status.  Any ideas????
Private Sub cmdDelete_Click()
If Me.Parent.Status > 10 Then
    DoCmd.SetWarnings False
    GoTo ErrorLine:
ElseIf IsNull(Me.Item__) Then
    DoCmd.SetWarnings False
    MsgBox "There is no line item to delete!", , "Cannot Delete Record!"
    Exit Sub
    DoCmd.SetWarnings False
    If MsgBox("Are you sure you want to delete this line item?", vbYesNo, "Delete Line Item?") = vbYes Then
        DoCmd.RunCommand acCmdSelectRecord
        DoCmd.RunCommand acCmdDeleteRecord
        Exit Sub
        Exit Sub
    End If
    Exit Sub
    DoCmd.SetWarnings True
    MsgBox "This record cannot be deleted at this time!", , "Cannot Delete Record!"
    Exit Sub
End If
End Sub
Avatar of Monterey

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answers