Results 1 to 4 of 4

user access to delete

  1. #1
    54.69.6d.20 is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2012
    Posts
    21

    Smile user access to delete

    I want to not allow certain people to delete a record in a Form.



    I know you can change the Allow Deletions, but it's not working. I think it's because the Form is in a Form.... Not sure.

    I know I have user and group permissions, but it's not using that. It has an Employee Table for permissions. Everyone's under Admin.

    So, I'm thinking my last option is code. I know I can add:

    Private Sub Form_Delete(Cancel As Integer)
    Cancel = True
    MsgBox "This record can't be deleted."
    End Sub

    But, I don't want to lock out everyone. Just want one or two people to be able to have this access. So I tried:

    Private Sub Form_Delete(Cancel As Integer)
    If AccessManagment Then
    Cancel = False
    If Cancel = True Then
    MsgBox "You cannot delete this record"
    End Sub


    As I figured, it's not working. AccessManagment is a column under the Employee Table

    Thanks for the help

  2. #2
    dandoescode is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    85
    Wow you can set an Integer to true in VBA? Learn something new every day.

  3. #3
    dandoescode is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    85
    Also it may be inefficient but could you just build a permissions table and have it reference that?

  4. #4
    54.69.6d.20 is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2012
    Posts
    21
    Yes I stated that. It is using a table for permissions. However, I need help on the code.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 13
    Last Post: 11-18-2013, 02:20 PM
  2. Delete Query Access SQL
    By tlindeman in forum Queries
    Replies: 1
    Last Post: 05-01-2012, 12:14 PM
  3. Replies: 2
    Last Post: 04-25-2012, 08:14 AM
  4. Replies: 2
    Last Post: 01-24-2012, 02:16 PM
  5. Replies: 12
    Last Post: 10-20-2011, 08:22 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums