Disallow edits for subform

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
 
S

Scott McDaniel

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.
 
J

John Vinson

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top