J johndoh!! Registered User. Local time Today, 00:13 Joined Oct 18, 2001 Messages 26 Mar 5, 2002 #1 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?
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?
Fornatian Dim Person Local time Today, 00:13 Joined Sep 1, 2000 Messages 1,396 Mar 5, 2002 #2 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
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
J johndoh!! Registered User. Local time Today, 00:13 Joined Oct 18, 2001 Messages 26 Mar 5, 2002 #3 Thanks Fornatian it worked great!! I appreciate your taking the time to help!!