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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I call a procedure using variable sub form? 1

Status
Not open for further replies.

TheFitz

Programmer
Dec 18, 2003
140
GB
Hi All,

I've got a form with a treeview and a subform inside.

Depending on the record selected on the TreeView, it will show a different form within the sub form. All sounding ok thus far!!

Well, as part of the above, I'm using Case statements to define the form name, which is then used a number of places later on.

So, I want to call a procedure on the 'variable' subform, which is called "updateform()" on each of the forms, however, I can't seem to work out how to do it.

Can anyone help?

Thanks in advance,

Fitz
Did you know, there are 10 types of people in this world:
* Those who understand binary
and
* Those who Don't!!
 
Provided updateform() is declared as Public in each form:
Call Me.Controls("name of control hosting the subform").Form.updateform()

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Perfect, thanks!!!

I knew it would be easy!!

Fitz
Did you know, there are 10 types of people in this world:
* Those who understand binary
and
* Those who Don't!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top