How to prevent users from right click deleting the rows in MS Access in a data view or divided form view

ODSCm

New Member
Joined
Dec 18, 2020
Messages
32
Office Version
  1. 2016
Platform
  1. Windows
Hello Everyone,

I want to make right click delete option passive for users so that they can not delete any row in Form.
İs it possible to do that? At the same time I do not want to lose the feature of right click copy.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
IMO you should simply make the form read only for whichever users you don't want deleting records, or simply make that the case for everyone. One way to do that is to set the recordset type to Snapshot (property sheet, data tab). If you need to allow some users to delete, you need a table of users along with their permission level(s).
 
Upvote 0
I want to make right click delete option passive for users so that they can not delete any row in Form.
You can also disallow deleting in the properties for the form.

Lots of other ways to achieve what you're looking to do, too. I'd recommend running a Google search to see these other methods.
 
Upvote 0
I should have also said that even if one does figure out how to trap right click but only for deleting a record (and nothing else) what's to stop them from selecting a record and pressing the delete key? Nothing, I'd say.
 
Upvote 0
I'd set AllowDeletions of the form to False ?
You can still delete field values. Not the same as a right click delete or entirely removing the record, I know. However, if the recordset is snapshot as I mentioned, you can't delete records or values. I guess what to do depends on what level of prevention is really required.
 
Upvote 0
Hello Everyone I just set no for the property of form deletion in Access as JonXL said.. İt works
 
Upvote 0
Hello Everyone I just set no for the property of form deletion in Access as JonXL said.. İt works
Interesting. But I thought Micron had a good point about deleting field values.

With my solution, even though users can't delete whole records they can still clear out fields and so delete data from your table. And certainly preventing that is the real aim, no?

The snapshot approach seems much more foolproof and takes just as many clicks to implement. ;)
 
Upvote 0

Forum statistics

Threads
1,221,528
Messages
6,160,346
Members
451,639
Latest member
Kramb

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top