On Tue, 25 May 2004 03:34:12 GMT, Shyguy wrote:
I have two forms that both open the same (3rd) form.
The third form does the same thing, but a little differently depending
on which form it is opened from. Is there a way I can check which
form is open so I can flag how the third form acts?
Thanks for any help
If the other forms are opening this third form, you can use the third
form's OpenArgs property to determine which form opened it.
In Form1 and Form2:
DoCmd.OpenForm "Form3", , , , , , Me.Name
In Form3's Load event:
If Me.OpenArgs = "Form1" Then
' Do this
ElseIf Me.OpenArgs = "Form2" Then
' Do Something else
Else
' It's not been opened from Form1 or Form2
' Don't do anything
End If
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.