469,342 Members | 5,945 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,342 developers. It's quick & easy.

How to pass variable value...

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
5 6784
"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
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
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

"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
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.

Similar topics

5 posts views Thread by wilson | last post: by
4 posts views Thread by z_learning_tester | last post: by
5 posts views Thread by David++ | last post: by
10 posts views Thread by Robert Dailey | last post: by
6 posts views Thread by lisp9000 | last post: by
12 posts views Thread by Bryan Parkoff | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.