Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to reference subform/subsubform with variables

Status
Not open for further replies.

Shaker36

Programmer
Nov 20, 2001
8
0
0
CA
I have successfully managed to reference a subform using a
variable, using the following syntax:

set frmMain = Forms(varFormName)
set frmSub = frmMain(subctl.name).form

This works if the subform control's name is DIFFERENT from
the sourceobject.

HOWEVER, the code below does not work to reference the
subsubform object.

set frmSubSub = frmSub(subsubctl.name).form

It returns error 2455 "Invalid reference to the
Form/Report property"

Any ideas how to do this?
 
wouldn't
Forms!mainform!subform!subsubform!ctrl
work??
Just a thought...

--James
junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
The short answer is no, I want to be able to use variables for the form/subform/subsubform names. I managed to accomplish this using the above syntax for the subform but it doesn't work for the nested subform.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top