MDI

S

S4

I have a search screen that calls a MDI Parent form that has several MDI
Child form options. Since more than one search can be clicked on and
therefore more than one MDI Parent form can be open at one time, I need to
keep all variables within each MDI Parent/Child session distict. What is
the best way to declare and keep track of each MDI session variables.

Thanks again,

Richard


--
Richard Grene

S4 Solutions, Inc,
1757 Merrick Avenue
Suite 204
Merrick, NY 11566
516-379-8630
516-379-8633 (fax)

________________________________

This mailbox protected from junk email by MailFrontier Desktop
from MailFrontier, Inc. http://info.mailfrontier.com
 
G

Guest

Richard,

One way is to use a public variable on the MDI form.

For example, on a MDI form that I have named mdiSchoolManager:

Public myProperty As String = "Hello"

Obviously, myProperty can be accessed from the MDI form. It can also be
accessed from child forms, like this.

In a button's click event on a child form:

Dim frm As mdiSchoolManager

frm = Me.MdiParent

MsgBox(frm.myProperty)

frm.myProperty = "Goodbye"

MsgBox(frm.myProperty)

Kerry Moorman
 
Top