Referring a form inside a form using Access VBA 2007

ramanan1986

Registered User.
Local time
Today, 14:43
Joined
Mar 8, 2013
Messages
10
Hi,

I have a Form called X which contains a subform called Y. I have placed this Form inside another form called Z.

There is a CommandButton which when clicked must refer to the Subform. How do I do this?

I tried using [Z]![X]!Y, Form_Z.Form_X.Y, [Z]![X].Y but it throws an error saying the form name has been misspelled

Any suggestions to work this out.

Thanks.
 
Welcome to the forum.

For the correct syntax for referring to forms, subforms, their controls and properties check, and bookmark, this link.
 
Thanks a lot John. This is really helpful

But, this still doesn't answer referring to a Subform in a Form inside another Form.
 
Did you go through the Link JBB provided? It is sort of a Matrix.. you need to map which form you want to refer..

First look for the location of the button.. Then look for the form you want to refer.. Then finally what you wish to refer..
 
Yes Eugin. I checked and its helpful.

But the options in that matrix talk about multiple subforms within forms. My problem is Subform in a Form inside a Form. The matrix doesn't address this.
 

Users who are viewing this thread

Back
Top Bottom