Subform

  • Thread starter Thread starter rafik
  • Start date Start date
R

rafik

I created a form "form1" with a subform "subform1" and the
"subform1" has it own subform "Subform2"

I need the syntax to allowedits from "form1"

i tried this but its not working
Form.[subform1].[Form]![Subform2].Form.AllowEdits = False
please can you help
 
so, from within form1, you want to set the AllowEdits property of subform2
to False? if yes, try

Me!Subform1ControlName!Subform2ControlName.Form.AllowEdits = False

"Me" refers to form1 (where the code is running). note that you have to use
the name of the *subform control* for each subform. the subform control name
may be the same as the name of the subform - or it may be different. to get
the subform control name:

1. open form1 in design view.
2. click once on the subform (within form1 design view), to select it.
3. in the Properties box, click the Other tab.
4. look at the Name line. that's the name of the subform control.

to get the name of the subform control for subform2, open subform1 in design
view, click once on subform2 (within subform1 design view), to select it.
then follow 3 and 4 above.

hth
 
Back
Top