Referencing a form name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to get some variables from another open form. I am passing the
name of the form with the OpenArgs variable but cannot seem to come up with
the correct syntax to get it to work. Below is part of the code.

OpenedFromForm = Me.OpenArgs
Actionee = Forms!["OpenedFromForm"].Actionee.Value

The current code assumes the form name is "OpenedFromForm" instead of the
variable defined by Me.OpenArgs. Any help would be appreciated.

Thanks.

-Scott
 
Sorry, just to clarify

if I have a proceedure called "QuickJump" on frmContacts
then from frmCompany I would type
forms("frmContacts").QuickJump to run the code

George Nicholson said:
If OpenArgs is your form name:
Actionee = Forms(Me.OpenArgs).Actionee.Value

(Note: No quotes)

HTH,
--
George Nicholson

Remove 'Junk' from return address.


hishi said:
I am trying to get some variables from another open form. I am passing the
name of the form with the OpenArgs variable but cannot seem to come up
with
the correct syntax to get it to work. Below is part of the code.

OpenedFromForm = Me.OpenArgs
Actionee = Forms!["OpenedFromForm"].Actionee.Value

The current code assumes the form name is "OpenedFromForm" instead of the
variable defined by Me.OpenArgs. Any help would be appreciated.

Thanks.

-Scott
 
ignore the previous post..sorry, wrong thread...
Michael S. Montoya said:
Sorry, just to clarify

if I have a proceedure called "QuickJump" on frmContacts
then from frmCompany I would type
forms("frmContacts").QuickJump to run the code

George Nicholson said:
If OpenArgs is your form name:
Actionee = Forms(Me.OpenArgs).Actionee.Value

(Note: No quotes)

HTH,
--
George Nicholson

Remove 'Junk' from return address.


hishi said:
I am trying to get some variables from another open form. I am passing the
name of the form with the OpenArgs variable but cannot seem to come up
with
the correct syntax to get it to work. Below is part of the code.

OpenedFromForm = Me.OpenArgs
Actionee = Forms!["OpenedFromForm"].Actionee.Value

The current code assumes the form name is "OpenedFromForm" instead of the
variable defined by Me.OpenArgs. Any help would be appreciated.

Thanks.

-Scott
 
If OpenArgs is your form name:
Actionee = Forms(Me.OpenArgs).Actionee.Value

(Note: No quotes)

HTH,
 
Thanks. That worked!

George Nicholson said:
If OpenArgs is your form name:
Actionee = Forms(Me.OpenArgs).Actionee.Value

(Note: No quotes)

HTH,
--
George Nicholson

Remove 'Junk' from return address.


hishi said:
I am trying to get some variables from another open form. I am passing the
name of the form with the OpenArgs variable but cannot seem to come up
with
the correct syntax to get it to work. Below is part of the code.

OpenedFromForm = Me.OpenArgs
Actionee = Forms!["OpenedFromForm"].Actionee.Value

The current code assumes the form name is "OpenedFromForm" instead of the
variable defined by Me.OpenArgs. Any help would be appreciated.

Thanks.

-Scott
 
Back
Top