Question : Detect Open Form

Hello,

I have three forms:

frmA (contains txtA)
frmB (contains txtB)
frmC (contains txtC)

frmC can be opened from either frmA or frmB.  Depending on which form is open, txtA or txtB should be populated with the value of txtC.

For example:  If frmC is opened from frmA, then txtA should equal txtC.  If frmC is opened from frmB, then txtB should equal txtC.

How do I determine which form frmC was opened from and intern populate its textbox?

Thanks in advance,

Tim

Answer : Detect Open Form

Hello tgerman10,

In the Open form command there is a paramtere called 'OpenArgs'.
Set this value to "FormA" in the statement in FormA and set Openargs to "FormB" in the open statement in formB.

In formC, you can test the value of Openargs and thereby know which form it was that opened formC.

Pete
Random Solutions  
 
programming4us programming4us