Me = Forms!FormName
> Does
>
> NameOfSubformControl = MainFormName
No
> or
>
> NameOfSubformControl = MainFormName!SubFormName
No
The full syntax, without the "Me" shortcut would be:
If Forms!MainFormName!SubformControlName.Form.AllowEdits = False
you need to subsitute the appropriate names for the name of the main form
and the name of the subform control. Note that the name of the subform
control and the subform name can be the same or different.

Signature
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
> If so does the new procedure look like this:
>
[quoted text clipped - 19 lines]
>
>> If Me.NameOfSubformControl.AllowEdits = False Then
ISSB Programmer - 30 May 2007 00:22 GMT
Thanks for clearing that up. How would I use that in a subprocedure that the
form calls? Is there a way to substitute
Forms!MainFormName!SubformControlName
with an input parameter such as (strControlPathName as String)?
> The full syntax, without the "Me" shortcut would be:
>
[quoted text clipped - 3 lines]
> and the name of the subform control. Note that the name of the subform
> control and the subform name can be the same or different.
Arvin Meyer [MVP] - 30 May 2007 14:21 GMT
The same code that you wrote should work. What you need to use though is the
control name, not the form name. Often they are the same, but if they are
different, the form name won't work. To me sure, select the subform in
Design View, then check the Name property on the Other tab of the property
sheet.

Signature
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
> Thanks for clearing that up. How would I use that in a subprocedure that
> the
[quoted text clipped - 11 lines]
>> and the name of the subform control. Note that the name of the subform
>> control and the subform name can be the same or different.