Referring to Subforms

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
 
J

John Vinson

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]
 

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