|
-
Nov 27th, 2002, 11:14 AM
#1
Thread Starter
Member
MDI / Child question
Can I call a Function that exists on a child form from a toolbar click in the MDI form? I have a toolbar button called Save and a function on the Child form called SaveAppt. What I have right now is:
VB Code:
Select Case Button.Key
Case "new"
Call CreateNewSchedule
Case "save"
If gblnWindowExists Then
frmChild.SaveAppt
End If
End Select
Rich Stern
http://www.AcidPlanet.com/Jasp182
http://www.InsomniacRecords.com
http://www.mp3.com/Jasp182
-
Nov 27th, 2002, 11:26 AM
#2
If you have multiple instances of frmChild open, you will need to call the particular instance you are looking for.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Nov 27th, 2002, 11:28 AM
#3
Thread Starter
Member
only one instance
One instance of frmChild only. I know how to use ActiveForm or refer to the form in a collection if that were the case, but I get errors when using ActiveForm.(FunctionName) or frmChild.(FunctionName).
I can't seem to refer to a form-level variable, collection, or function from a different form. That's what I'm trying to figure out.
Thanks though.
Rich Stern
http://www.AcidPlanet.com/Jasp182
http://www.InsomniacRecords.com
http://www.mp3.com/Jasp182
-
Nov 27th, 2002, 11:37 AM
#4
Are you sure the methods/variables are declared as Public?
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Nov 27th, 2002, 11:50 AM
#5
Thread Starter
Member
They weren't. I copied and pasted them from the MDI into the Child form and forgot to do that. Feel free to smack me for asking a stupid question! Thanks.
Rich Stern
http://www.AcidPlanet.com/Jasp182
http://www.InsomniacRecords.com
http://www.mp3.com/Jasp182
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|