Results 1 to 8 of 8
  1. #1
    jparker1954 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    85

    Deletions vs. Edits

    Just when I think I'm getting it. I've got a form that I want to allow people to add or delete records, but NOT edit records. I thought that changing the Form properties to Allow Deletions and Allow Additions, but NOT Edits would do this. Silly me.

    Is there a way to Allow Deletions without allowing Edits. I need to have some control over what's going in and out of the database.

  2. #2
    jparker1954 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    85
    What I'm really trying to do is control changes to a database that I'm updating a by using union queries and append queries to add new information daily.

    I'm concerned that if people delete or edit a record in one of three databases I've used in the union query, that change won't show up in the final appended database. The appended database will still show the old information. Is there a way to prevent that, short not allowing edits or deletes and having the people contact me directly to manually edit or delete entries?

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,945
    Did you also set Allow Edits property to No?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    jparker1954 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    85
    Yes. Doing that made the Delete Button useless. Allow Deletions- Yes, Allow Additions-Yes and Allow Edits-No. Delete Button won't work. Change Allow Edits to Yes, Delete Button works.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,945
    Interesting, I tested that setup and it does exactly what you are looking for. I could add and delete records but not edit fields.

    Do you want to make the db available for analysis?

    Can't say if there is a better way, don't know your data and business situation. My first question is why appending and not linking to data?
    Last edited by June7; 09-20-2011 at 11:20 AM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    jparker1954 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    85
    Are you using Access 2010? The file format that I'm using is Access 2000, unfortunately.

    I think the problem is the code that is used for the Delete Button. I think the acEditMenu might be causing a problem, but I don't know what to use otherwise. Code is:

    Private Sub DeleteRecord_Click()
    On Error GoTo Err_DeleteRecord_Click

    DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
    DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
    Exit_DeleteRecord_Click:
    Exit Sub
    Err_DeleteRecord_Click:
    MsgBox Err.Description
    Resume Exit_DeleteRecord_Click

  7. #7
    jparker1954 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    85
    I was correct about the code. I found a thread in another forum that shows the code for the Delete Button in the 2007 version. This one works perfectly in my 2000 version and does exactly what I need it to do.

    By the way, I'm using union queries and appending data, because I have 3 remote locations that enter harvest data into local databases, then I combine that data into one database that we can track.

    Thanks,

  8. #8
    jparker1954 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    85
    In case anyone else needs it, the code that works is:

    Private Sub CmdDelete_Click()
    On Error GoTo Err_CmdDelete_Click


    DoCmd.RunCommand acCmdSelectRecord
    DoCmd.RunCommand acCmdDeleteRecord
    Me.Refresh

    Exit_CmdDelete_Click:
    Exit Sub

    Err_CmdDelete_Click:
    MsgBox Err.Description
    Resume Exit_CmdDelete_Click

    End Sub

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

Similar Threads

  1. Forms! Allow Deletions/Edits - No
    By cap.zadi in forum Forms
    Replies: 9
    Last Post: 09-16-2011, 01:37 PM
  2. Replies: 2
    Last Post: 03-29-2011, 05:53 AM
  3. Disallow edits to saved query
    By MWMike in forum Forms
    Replies: 2
    Last Post: 03-08-2011, 09:24 PM
  4. protecting records from unwanted edits
    By Hunt2871 in forum Security
    Replies: 2
    Last Post: 08-01-2010, 10:49 PM
  5. Replies: 1
    Last Post: 03-11-2010, 12:15 AM

Posting Permissions

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