Referring to Subforms

  • Thread starter Thread starter CSDunn
  • Start date Start date
C

CSDunn

Hello,
I usually have to refer to controls on subforms when creating conditions
within macros, and I do this using the following convention:
Forms![main form name]![subform control name].Form![control name]

I now have a situation where I have a subform within a subform, and I need
to refer to a control in the deepest subform. In other words, I need to do
this:
Forms![main form name]![subform control name].Form! [subform control name]
[control name]

I have tried a couple of things to refer to this second subform, but I can't
get anything to work, and I have not been able to find any resources about
how this is done.

Any Ideas?

Thanks!

CSDunn
 
I now have a situation where I have a subform within a subform, and I need
to refer to a control in the deepest subform. In other words, I need to do
this:
Forms![main form name]![subform control name].Form! [subform control name]
[control name]

I have tried a couple of things to refer to this second subform

You need the Form! property TWICE, once for the subform, once for the
sub-subform. Try

Forms![main form name]![subform control name].Form![subform control
name].Form![control name]
 
Back
Top