Change property of subform to Allowdeletions = False (1 Viewer)

AlvaroCity

Registered User.
Local time
Today, 23:39
Joined
Jul 16, 2016
Messages
70
Hi there

I bumped into a problem with my db.

I have a form with a subform and I would like that when a press a button the properties of this subform change to Allowdeletions= False
The problem is that I don't know what code I have to write to do so.

Any ideas?

Thank you
 

static

Registered User.
Local time
Today, 23:39
Joined
Nov 2, 2015
Messages
823
subfrm.Form.AllowDeletions = Not subfrm.Form.AllowDeletions
 

Cronk

Registered User.
Local time
Tomorrow, 08:39
Joined
Jul 4, 2013
Messages
2,774
That code toggles the AllowEdits setting.

Just to set the state as requested, on the OnClick event of a button on the parent form, the code is
Me.YourSubformControlName.Form.AllowEdits = False

If the button is on the subForm, the code is
Me.allowedits=False
 

AlvaroCity

Registered User.
Local time
Today, 23:39
Joined
Jul 16, 2016
Messages
70
Thank you very much!

I fix it.

I don't know how could I be so blind :D
 

Users who are viewing this thread

Top Bottom