473,387 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 7060
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Seeker | last post by:
Newbie question here... I have a form with some radio buttons. To verify that at least one of the buttons was chosen I use the following code ("f" is my form object) : var btnChosen; for...
5
by: wilson | last post by:
Dear all, In this time, I want to pass array to function. What should I declare the parameter in the function?i int array or int array? Which one is correct? ...
4
by: z_learning_tester | last post by:
I'm reading the MS press C# book and there seems to be a contradiction. Please tell me which one is correct, 1 or 2. Thanks! Jeff 1. First it gives the code below saying that it prints 0 then...
5
by: David++ | last post by:
Hi folks, I would be interested to hear peoples views on whether or not 'pass by reference' is allowed when using a Web Service method. The thing that troubles me about pass-by-reference into...
10
by: Robert Dailey | last post by:
Hi, I noticed in Python all function parameters seem to be passed by reference. This means that when I modify the value of a variable of a function, the value of the variable externally from the...
10
by: mike4722 | last post by:
I wish to have the form to be able to automatically select the radio button based on the logic of HTML/php variable. example show below: javascript: function autoForm(value) { var myForm =...
6
by: lisp9000 | last post by:
I've read that C allows two ways to pass information between functions: o Pass by Value o Pass by Reference I was talking to some C programmers and they told me there is no such thing as...
11
by: venkatagmail | last post by:
I have problem understanding pass by value and pass by reference and want to how how they are or appear in the memory: I had to get my basics right again. I create an array and try all possible...
12
by: Bryan Parkoff | last post by:
I write my large project in C++ source code. My C++ source code contains approximate four thousand small functions. Most of them are inline. I define variables and functions in the global scope....
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.