Disallow edits for subform

  • Thread starter Thread starter Sanjin Vidlanovic
  • Start date Start date
S

Sanjin Vidlanovic

OK, one more for today.

I have a form with a subform on it. When I open the form I check (on
Activate) one control and depending on it's value run a command:

Me.AllowEdits = False

This prevents controls on the form to be edited, but controls on the subform
remain
open.

How to prevent user from editing a subform on a locked document


Thx, Sanjin
 
You must also set this on your subform:

Me.NameOfSubformCONTROL.Form.AllowEdits = False

Take special note of the syntax; "NameOfSubFormControl" is most likely NOT
the name of the .SourceObject - it's the name of the control on the MAIN
form that HOUSES the subform object.
 
Me.AllowEdits = False

This prevents controls on the form to be edited, but controls on the subform
remain
open.

How to prevent user from editing a subform on a locked document

Me!subformname.Form.AllowEdits = False

where subformname is the name of the Subform control (not necessarily
the name of the form within that control).
 
Back
Top