If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How can I allow user to edit BUT NOT delete the records in a view?
Dear all,
Could anybody tell me that how I can allow user to edit BUT NOT delete the records in a view? I know there are only 3 options when opening a view: Add (the user can add new records but can't view or edit existing records), Edit (the user can view or edit existing records and add/delete new records), or Read Only (the user can only view records). The Edit mode will enable Delete command. The delete command is very dangerous. The users may accidentally delete all the records without receiving any warning at all. But if I choose to open the view as Read only, then they can only read but not edit the records. Does anybody have any idea about how to allow user to edit BUT NOT delete the records in a view? Thanks a lot! |
#2
|
|||
|
|||
Not sure what you mean by "view". Are you in a Form? If so, set the "allow
Deletions" property to "No". If you are using user-level security, you can also limit a user's ability to delete records. This is safer since the user can't simply close the form and open the table directly./ Rick B "Oldmonkey" wrote in message ... Dear all, Could anybody tell me that how I can allow user to edit BUT NOT delete the records in a view? I know there are only 3 options when opening a view: Add (the user can add new records but can't view or edit existing records), Edit (the user can view or edit existing records and add/delete new records), or Read Only (the user can only view records). The Edit mode will enable Delete command. The delete command is very dangerous. The users may accidentally delete all the records without receiving any warning at all. But if I choose to open the view as Read only, then they can only read but not edit the records. Does anybody have any idea about how to allow user to edit BUT NOT delete the records in a view? Thanks a lot! |
#3
|
|||
|
|||
?Opening a view? Do you mean a form?
Forms have 4 properties (Allow Edits, Allow Deletions, Allow Additions, Data Entry) -- have you tried setting Allow Deletions to No? Forms have "events" -- like the BeforeDelete event. You can add code that cancels the deletion in the BeforeDelete event. Good luck Jeff Boyce Access MVP "Oldmonkey" wrote in message ... Dear all, Could anybody tell me that how I can allow user to edit BUT NOT delete the records in a view? I know there are only 3 options when opening a view: Add (the user can add new records but can't view or edit existing records), Edit (the user can view or edit existing records and add/delete new records), or Read Only (the user can only view records). The Edit mode will enable Delete command. The delete command is very dangerous. The users may accidentally delete all the records without receiving any warning at all. But if I choose to open the view as Read only, then they can only read but not edit the records. Does anybody have any idea about how to allow user to edit BUT NOT delete the records in a view? Thanks a lot! |
#4
|
|||
|
|||
Rick & Jeff, thank you for your reply.
I should have made it more clear. Actually, I have a macro, the action for this macro is 'OpenView' which open a certain view in the SQL server. But I know there are only 3 options when opening a view: Add (the user can add new records but can't view or edit existing records), Edit (the user can view or edit existing records and add/delete new records), or Read Only (the user can only view records). Could you describe in details what's the fastest way to allow user to edit BUT NOT delete the records in that view I opened in my macro? Thanks again! "Rick B" wrote: Not sure what you mean by "view". Are you in a Form? If so, set the "allow Deletions" property to "No". If you are using user-level security, you can also limit a user's ability to delete records. This is safer since the user can't simply close the form and open the table directly./ Rick B "Oldmonkey" wrote in message ... Dear all, Could anybody tell me that how I can allow user to edit BUT NOT delete the records in a view? I know there are only 3 options when opening a view: Add (the user can add new records but can't view or edit existing records), Edit (the user can view or edit existing records and add/delete new records), or Read Only (the user can only view records). The Edit mode will enable Delete command. The delete command is very dangerous. The users may accidentally delete all the records without receiving any warning at all. But if I choose to open the view as Read only, then they can only read but not edit the records. Does anybody have any idea about how to allow user to edit BUT NOT delete the records in a view? Thanks a lot! |
#5
|
|||
|
|||
A possible solution: SQL Server has separate Update and Delete permission
on (data displayed in) View. Thus, you can use SQL Server Security to prevent users from deleting. -- HTH Van T. Dinh MVP (Access) "Oldmonkey" wrote in message ... Rick & Jeff, thank you for your reply. I should have made it more clear. Actually, I have a macro, the action for this macro is 'OpenView' which open a certain view in the SQL server. But I know there are only 3 options when opening a view: Add (the user can add new records but can't view or edit existing records), Edit (the user can view or edit existing records and add/delete new records), or Read Only (the user can only view records). Could you describe in details what's the fastest way to allow user to edit BUT NOT delete the records in that view I opened in my macro? Thanks again! |
#6
|
|||
|
|||
Thanks, Van,
I will try that. Is there any other quicker and simpler way to do that? "Van T. Dinh" wrote: A possible solution: SQL Server has separate Update and Delete permission on (data displayed in) View. Thus, you can use SQL Server Security to prevent users from deleting. -- HTH Van T. Dinh MVP (Access) "Oldmonkey" wrote in message ... Rick & Jeff, thank you for your reply. I should have made it more clear. Actually, I have a macro, the action for this macro is 'OpenView' which open a certain view in the SQL server. But I know there are only 3 options when opening a view: Add (the user can add new records but can't view or edit existing records), Edit (the user can view or edit existing records and add/delete new records), or Read Only (the user can only view records). Could you describe in details what's the fastest way to allow user to edit BUT NOT delete the records in that view I opened in my macro? Thanks again! |
#7
|
|||
|
|||
Not from the Access ADP AFAIK.
-- HTH Van T. Dinh MVP (Access) "Oldmonkey" wrote in message ... Thanks, Van, I will try that. Is there any other quicker and simpler way to do that? |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I delete a Form Template from "User Templates in File Syst. | FishnMan | General Discussion | 1 | March 23rd, 2005 02:20 PM |
deleting values in combo boxes | R | General Discussion | 23 | November 19th, 2004 02:30 PM |
The Edit and Delete buttons in Macros are greyed out and do not wo | Emeritus | General Discussion | 1 | September 24th, 2004 08:08 PM |
Columns and layout problems | Phil | Setting Up & Running Reports | 4 | August 18th, 2004 01:34 PM |
stopping a procedure if the user cancels a delete operation | Paul James | Using Forms | 2 | August 6th, 2004 12:06 AM |