473,842 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 7085
"GB" <v7****@hotmail .com> wrote in
news:9_zKd.7555 0$Qb.5473@edtnp s89:
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******@sPAmp atico.ca> wrote in message
news:1106959484 .144984a48fea02 f5b021342e22718 772@teranews...
"GB" <v7****@hotmail .com> wrote in
news:9_zKd.7555 0$Qb.5473@edtnp s89:
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********@nos pam.com> wrote in message
news:Ll******** ******@newsread 3.news.atl.eart hlink.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******@sPAmp atico.ca> wrote in message
news:1106959484 .144984a48fea02 f5b021342e22718 772@teranews...
"GB" <v7****@hotmail .com> wrote in
news:9_zKd.7555 0$Qb.5473@edtnp s89:
> 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.7555 0$Qb.5473@edtnp s89...
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_djsteel e@NOSPAM_canada .com> wrote in message
news:V_******** ************@ro gers.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********@nos pam.com> wrote in message
news:Ll******** ******@newsread 3.news.atl.eart hlink.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******@sPAmp atico.ca> wrote in message
news:1106959484 .144984a48fea02 f5b021342e22718 772@teranews...
"GB" <v7****@hotmail .com> wrote in
news:9_zKd.7555 0$Qb.5473@edtnp s89:

> 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
3152
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 (count = 0; count <= 1; count++) { if (eval(f.RadioButtons.checked)) { btnChosen = true; }
5
3431
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? /******************************************************** Below is my code: ********************************************************/
4
3411
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 42. They say that 42 is printed the second time since the value was wrapped in a class and therefore became passed by reference. (sorry for any typos I am a newbie here ;-)
5
7830
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 a WebService is that essentially we are passing an address of an object which resides on the 'local machine' i.e. a local machine object address. Surely when the WebService method is called and run 'on the server', the reference type will be...
10
13675
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 function is also modified. Sometimes I wish to work with "copies", in that when I pass in an integer variable into a function, I want the function to be modifying a COPY, not the reference. Is this possible?
10
16509
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 = document.forms; if (value == '1') myForm.elements.checked = true;
6
2721
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 pass by reference in C since you are just passing an address (or a pointer value address I guess?). So I was wondering is this correct?
11
3371
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 ways of passing an array. In the following code, fun1(int a1) - same as fun1(int* a1) - where both are of the type passed by reference. Inside this function, another pointer a1 is created whose address &a1 is different from that of the passed...
12
3027
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. The global variables and global functions are hidden to prevent from accessing by the programmers. All global functions share global variables. Only very few global functions are allowed to be reusability for the programmers to use. Few...
12
11122
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. Here is a newbie mistake that I found myself doing (as a newbie), and that even a master programmer, the guru of this forum, Jon Skeet, missed! (He knows this I'm sure, but just didn't think this was my problem; LOL, I am needling him) If...
0
9865
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9709
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10934
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10303
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7853
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7025
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5694
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.