By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,611 Members | 1,642 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,611 IT Pros & Developers. It's quick & easy.

How to pass variable value...

P: n/a
GB
Hello:
In my MS Access project I have two objects - my form and my report.
I need to pass variable value from
Command_click procedure of my form to
Report_open procedure of my report.
How can I do that?
I tried to declare this variable as Public in my form, but it does not
work -
when I reference to this variable in my report, it does not pass the value.

Thanks,
GB
Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"GB" <v7****@hotmail.com> wrote in
news:9_zKd.75550$Qb.5473@edtnps89:
Hello:
In my MS Access project I have two objects - my form and my
report. I need to pass variable value from
Command_click procedure of my form to
Report_open procedure of my report.
How can I do that?
I tried to declare this variable as Public in my form, but it
does not work -
when I reference to this variable in my report, it does not
pass the value.

Thanks,
GB


Read the help on the openreport action for the openargs parameter
--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #2

P: n/a
Although OpenForm has an OpenArgs procedure, AFAICS, OpenReport does not.

If the variable is declared as Public in a Standard Module (not a form
module), it should be visible to both the form and the report.

"Bob Quintal" <rq******@sPAmpatico.ca> wrote in message
news:1106959484.144984a48fea02f5b021342e22718772@t eranews...
"GB" <v7****@hotmail.com> wrote in
news:9_zKd.75550$Qb.5473@edtnps89:
Hello:
In my MS Access project I have two objects - my form and my
report. I need to pass variable value from
Command_click procedure of my form to
Report_open procedure of my report.
How can I do that?
I tried to declare this variable as Public in my form, but it
does not work -
when I reference to this variable in my report, it does not
pass the value.

Thanks,
GB


Read the help on the openreport action for the openargs parameter
--
Bob Quintal

PA is y I've altered my email address.

Nov 13 '05 #3

P: n/a
I believe it was added into Access 2002. It's definitely available in Access
2003.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"MacDermott" <ma********@nospam.com> wrote in message
news:Ll**************@newsread3.news.atl.earthlink .net...
Although OpenForm has an OpenArgs procedure, AFAICS, OpenReport does not.

If the variable is declared as Public in a Standard Module (not a form
module), it should be visible to both the form and the report.

"Bob Quintal" <rq******@sPAmpatico.ca> wrote in message
news:1106959484.144984a48fea02f5b021342e22718772@t eranews...
"GB" <v7****@hotmail.com> wrote in
news:9_zKd.75550$Qb.5473@edtnps89:
> Hello:
> In my MS Access project I have two objects - my form and my
> report. I need to pass variable value from
> Command_click procedure of my form to
> Report_open procedure of my report.
> How can I do that?
> I tried to declare this variable as Public in my form, but it
> does not work -
> when I reference to this variable in my report, it does not
> pass the value.
>
> Thanks,
> GB


Read the help on the openreport action for the openargs parameter
--
Bob Quintal

PA is y I've altered my email address.


Nov 13 '05 #4

P: n/a

"GB" <v7****@hotmail.com> wrote in message
news:9_zKd.75550$Qb.5473@edtnps89...
Hello:
In my MS Access project I have two objects - my form and my report.
I need to pass variable value from
Command_click procedure of my form to
Report_open procedure of my report.
How can I do that?
I tried to declare this variable as Public in my form, but it does not
work -
when I reference to this variable in my report, it does not pass the
value.


There are a number of ways to do this including through a public variable.
Note that public variables must be declared in a module.


Nov 13 '05 #5

P: n/a
Woops! My age is showing.
Thanks for bringing me up to speed!

- Turtle

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:V_********************@rogers.com...
I believe it was added into Access 2002. It's definitely available in Access 2003.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"MacDermott" <ma********@nospam.com> wrote in message
news:Ll**************@newsread3.news.atl.earthlink .net...
Although OpenForm has an OpenArgs procedure, AFAICS, OpenReport does not.
If the variable is declared as Public in a Standard Module (not a form
module), it should be visible to both the form and the report.

"Bob Quintal" <rq******@sPAmpatico.ca> wrote in message
news:1106959484.144984a48fea02f5b021342e22718772@t eranews...
"GB" <v7****@hotmail.com> wrote in
news:9_zKd.75550$Qb.5473@edtnps89:

> Hello:
> In my MS Access project I have two objects - my form and my
> report. I need to pass variable value from
> Command_click procedure of my form to
> Report_open procedure of my report.
> How can I do that?
> I tried to declare this variable as Public in my form, but it
> does not work -
> when I reference to this variable in my report, it does not
> pass the value.
>
> Thanks,
> GB

Read the help on the openreport action for the openargs parameter
--
Bob Quintal

PA is y I've altered my email address.



Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.