Who opened me?

johndoh!!

Registered User.
Local time
Today, 00:13
Joined
Oct 18, 2001
Messages
26
I have three forms (Orders, OrdersNew and OrdersSub). Both Orders and OrdersNew have a button that opens OrdersSub, how do i detect whithin OrdersSub the form that opened it?
 
Use the OpenArgs of the docmd.openform method to pass a value to the form.

In the OnLoad event use an argument to take appropriate action suchas:

If Me.OpenArgs = "Opened from form1" then
Msgbox "Form1 Originated"
Else
Msgbox "Form2 Originated"
End If

HTH

Ian
 
Thanks Fornatian it worked great!!

I appreciate your taking the time to help!!
 

Users who are viewing this thread

Back
Top Bottom