Link to home
Start Free TrialLog in
Avatar of Fritz Paul
Fritz PaulFlag for South Africa

asked on

Solved: How can I prevent deletions from a form in datasheet view?

Access 2010.
I have a form with a subform.
The subform is in datasheet view.
I have determined yesterday from EE that I cannot prevent record selectors in a form in datasheet view.
There must at least be a way to prevent deletions from the subform while in datasheet format.
I tried setting form settings "allow deletions" to "No", but that does not help. I can still delete rows.
I add a picture of my form property settings.
I can't see a way to delete the question. I found a solution.

Private Sub Form_Delete(Cancel As Integer)
    Cancel = True
End Sub

Open in new window


User generated image
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
How are you deleting the rows?
Avatar of Fritz Paul

ASKER

Hi Scott. I just selected a record and use any delete option, Press "Delete" on keyboard, "Right Click" , use delete button on ribbon..
Thanks all.
"Setting AllowDeletions to No works perfectly fine here "
That is exactly what I told the OP in the other thread, lol.