473,881 Members | 1,567 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"Global" Qualifier question

Lyn
Hi and Season's Greetings to all.

I have a question regarding the use of a qualifier word "Global". I cannot
find any reference to this in Access help, nor in books or on the Internet.
"Global" seems to be recognised by Access in at least three cases:-

1) "Global Const". Recently someone in this group helped me resolve a
problem, and it involved the use of a Global Const. By Googling "Global
Const", I got plenty of hits -- but they were mostly just snippets of code
using this type of statement. Is there any difference between "Global
Const" and "Public Const"? If so, what is it?

2) "Global" variable. In an experiment, I found that I could replace "Dim"
(or "Public" or "Private") with "Global" in a variable declaration and it
would be accepted by Access VBA. Example -- instead of "Public x As
Integer" I typed "Global x As Integer". Again, is there any difference
between "Public" and "Global" in the variables context?

3) "Global Sub/Function". In another experiment, I entered into a module:
"Global Sub xxx()" and pressed ENTER. The compiler accepted this, but
automatically deleted "Global", leaving just "Sub xxx()". However, if I
replaced "Global" with some arbitrary "word" (eg: "Qaz Sub xxx()"), I got a
compiler error. So it seems that the compiler accepts "Global Sub" but
treats it like a "Public Sub" (which just "Sub" defaults to).

So my question is: what is it with "Global"? My guess would be that it is
an obsolescent form that is still supported for backwards compatibility.
This could explain why it is not documented anywhere that I could find. If
so, is it fully equivalent with "Public". If not, what exactly does
"Global" mean, and where can I find any documentation?

I am sure the gurus out there will know the answer to this!

--
Cheers,
Lyn.
Nov 13 '05 #1
7 2692
On Fri, 24 Dec 2004 15:40:30 +1100, "Lyn" <lh******@ihug. com.au>
wrote:
Hi and Season's Greetings to all.
[...]
So my question is: what is it with "Global"? My guess would be that it is
an obsolescent form that is still supported for backwards compatibility.
This could explain why it is not documented anywhere that I could find. If
so, is it fully equivalent with "Public". If not, what exactly does
"Global" mean, and where can I find any documentation?


"Global" is indeed an obsolete keyword stemming from Access 2.0 and
earlier. You can replace any occurrence of "Global" with "Public"; the
two keywords mean exactly the same.

HTH
Matthias Kläy
--
www.kcc.ch
Nov 13 '05 #2
Lyn
Thanks Matthias. You have confirmed my suspicions.

--
Cheers,
Lyn.

"Matthias Klaey" <mp**@hotmail.c om> wrote in message
news:hg******** *************** *********@4ax.c om...
On Fri, 24 Dec 2004 15:40:30 +1100, "Lyn" <lh******@ihug. com.au>
wrote:
Hi and Season's Greetings to all.

[...]

So my question is: what is it with "Global"? My guess would be that it is
an obsolescent form that is still supported for backwards compatibility.
This could explain why it is not documented anywhere that I could find.
If
so, is it fully equivalent with "Public". If not, what exactly does
"Global" mean, and where can I find any documentation?


"Global" is indeed an obsolete keyword stemming from Access 2.0 and
earlier. You can replace any occurrence of "Global" with "Public"; the
two keywords mean exactly the same.

HTH
Matthias Kläy
--
www.kcc.ch

Nov 13 '05 #3

"Lyn" <lh******@ihug. com.au> wrote in message
news:cq******** **@lust.ihug.co .nz...
Hi and Season's Greetings to all.

I have a question regarding the use of a qualifier word "Global". I
cannot find any reference to this in Access help, nor in books or on the
Internet. "Global" seems to be recognised by Access in at least three
cases:-

1) "Global Const". Recently someone in this group helped me resolve a
problem, and it involved the use of a Global Const. By Googling "Global
Const", I got plenty of hits -- but they were mostly just snippets of code
using this type of statement. Is there any difference between "Global
Const" and "Public Const"? If so, what is it?

2) "Global" variable. In an experiment, I found that I could replace
"Dim" (or "Public" or "Private") with "Global" in a variable declaration
and it would be accepted by Access VBA. Example -- instead of "Public x
As Integer" I typed "Global x As Integer". Again, is there any difference
between "Public" and "Global" in the variables context?

3) "Global Sub/Function". In another experiment, I entered into a module:
"Global Sub xxx()" and pressed ENTER. The compiler accepted this, but
automatically deleted "Global", leaving just "Sub xxx()". However, if I
replaced "Global" with some arbitrary "word" (eg: "Qaz Sub xxx()"), I got
a compiler error. So it seems that the compiler accepts "Global Sub" but
treats it like a "Public Sub" (which just "Sub" defaults to).

So my question is: what is it with "Global"? My guess would be that it is
an obsolescent form that is still supported for backwards compatibility.
This could explain why it is not documented anywhere that I could find.
If so, is it fully equivalent with "Public". If not, what exactly does
"Global" mean, and where can I find any documentation?

I am sure the gurus out there will know the answer to this!

--
Cheers,
Lyn.


global is globe like. public is just public. no documentation needed yes?

***Sherwood Wang MVP***

Nov 13 '05 #4
Lyn
I'm sorry, I didn't understand your comment. I know what "global" means in
English, and in computer-speak it usually means something like "valid
everywhere". But then isn't that also what "public" means in the VBA
context? Hence Matthias' comment that both mean the same thing.

I wasn't using Access in its early version, so I am assuming from Matthias'
comment that "Public" has replaced "Global", or perhaps that the two terms
were so close in function that they were merged, possibly to avoid confusion
(like mine :-).

--
Cheers,
Lyn.

"Sherwood Wang" <sh****@waynesw orld.net> wrote in message
news:1103873112 .a49a4b10d0f142 d9086e9db99e296 6fb@teranews...

"Lyn" <lh******@ihug. com.au> wrote in message
news:cq******** **@lust.ihug.co .nz...
Hi and Season's Greetings to all.

I have a question regarding the use of a qualifier word "Global". I
cannot find any reference to this in Access help, nor in books or on the
Internet. "Global" seems to be recognised by Access in at least three
cases:-

1) "Global Const". Recently someone in this group helped me resolve a
problem, and it involved the use of a Global Const. By Googling "Global
Const", I got plenty of hits -- but they were mostly just snippets of
code using this type of statement. Is there any difference between
"Global Const" and "Public Const"? If so, what is it?

2) "Global" variable. In an experiment, I found that I could replace
"Dim" (or "Public" or "Private") with "Global" in a variable declaration
and it would be accepted by Access VBA. Example -- instead of "Public x
As Integer" I typed "Global x As Integer". Again, is there any
difference between "Public" and "Global" in the variables context?

3) "Global Sub/Function". In another experiment, I entered into a
module:
"Global Sub xxx()" and pressed ENTER. The compiler accepted this, but
automatically deleted "Global", leaving just "Sub xxx()". However, if I
replaced "Global" with some arbitrary "word" (eg: "Qaz Sub xxx()"), I got
a compiler error. So it seems that the compiler accepts "Global Sub" but
treats it like a "Public Sub" (which just "Sub" defaults to).

So my question is: what is it with "Global"? My guess would be that it
is an obsolescent form that is still supported for backwards
compatibility. This could explain why it is not documented anywhere that
I could find. If so, is it fully equivalent with "Public". If not, what
exactly does "Global" mean, and where can I find any documentation?

I am sure the gurus out there will know the answer to this!

--
Cheers,
Lyn.


global is globe like. public is just public. no documentation needed
yes?

***Sherwood Wang MVP***

Nov 13 '05 #5
Lyn, Sherwood Wang is known for trolling.

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #6
Lyn
Fair enough!

--
Cheers,
Lyn.

"Bas Cost Budde" <b.*********@he uvelqop.nl> wrote in message
news:cq******** **@news2.solcon .nl...
Lyn, Sherwood Wang is known for trolling.

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea

Nov 13 '05 #7
On Fri, 24 Dec 2004 12:39:03 +0100, Bas Cost Budde <b.*********@he uvelqop.nl>
wrote:
Lyn, Sherwood Wang is known for trolling.


Actually, a sock puppet under the name of Sherwood Wang.
Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2499
by: Javaman59 | last post by:
I saw in a recent post the :: operator used to reach the global namespace, as in global::MyNamespace I hadn't seen this before, so looked it up in MSDN, which explained it nicely. My question is, do "global" and "::" always go together? Is there any other use for these operators, than as a pair? TIA,
4
3540
by: BB | last post by:
Hello all, I might be missing something here, but am trying to understand the difference between using application-level variables--i.e. Application("MyVar")--and global variables--i.e. public myVar as string, etc. It seems to me that the scope and duration are the same, as they both are there while the application is running, and both go away when it quits. I presume that one difference is that the application state can be "flushed," such...
2
3721
by: Steve | last post by:
I am new to this newsgroup & to .NET in general. I have been playing around with Visual Studio .NET, building and rendering web pages using VB "code behind" files. My problem / question is; How do I ensure that changes made to the "Global.asax.vb" file are immediately reflected in the "Global.asax" file? After I change to the "Global.asax.vb" file, the "Global.asax" file date modified does not change and I do not see the updated values...
5
4945
by: dave | last post by:
If I have a class that hold, for instance, user settings that should be accessible to the entire program logic, what is a good paradigm to use? In C++, I would have made it a global object, protected if necessary for thread safety. In C#, of course, there are no global objects. The Program object is static, so cannot contain object instances. While I could store it in my main form pass it around, that seems cumbersome. I could do a...
11
3174
by: eBob.com | last post by:
I have this nasty problem with Shared methods and what I think of as "global storage" - i.e. storage declared outside of any subroutines or functions. In the simple example below this "global" storage is ButtonHasBeenClicked. In this simple example code in Form1 calls a routine in Module1 which then calls code back in Form1 (subroutine WhatEver). WhatEver needs to access ButtonHasBeenClicked but the reference to ButtonHasBeenClicked...
7
1850
by: twang090 | last post by:
I find in other team member's project, they are referencing a type in following format " public static global::ErrorReport.Description Description = new global::ErrorReport.Description(); " I do not understand the usage of "global" here, could anyone please clarify its usage and what benift of using that. Thanks in advance.
1
3390
by: Tom Berger | last post by:
Just a short question concerning exception handling.... All of my applications contain an event handling in the Main() like this one: static void Main() { // declare global exeption handler Application.ThreadException += new
2
3133
by: jmike | last post by:
I'm using some legacy code that has a user-defined exception in it. The top level program includes this line from TestRunError import * It also imports several other modules. These other modules do not explicitly import TestRunError. TestRunError is raised in various places throughout the modules.
4
3418
ChrisWang
by: ChrisWang | last post by:
Hi, I am having trouble understanding the use of 'global' variables I want to use a global variable with the same name as a parameter of a function. But I don't know how to use them at the same time. Here is a snippet of example code: def foo (a): global p global a p = a + 3 #here "a" will be reference to the global one a = 1
0
11103
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...
0
10720
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10819
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
9555
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7953
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
7113
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
5781
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
4597
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
3
3225
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.