Referencing a form name

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
 
M

Michael S. Montoya

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
 
M

Michael S. Montoya

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
 
G

George Nicholson

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

(Note: No quotes)

HTH,
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top