473,320 Members | 1,993 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,320 software developers and data experts.

"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 2660
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.com> wrote in message
news:hg********************************@4ax.com...
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****@waynesworld.net> wrote in message
news:1103873112.a49a4b10d0f142d9086e9db99e2966fb@t eranews...

"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.*********@heuvelqop.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.*********@heuvelqop.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
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...
4
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...
2
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...
5
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,...
11
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"...
7
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...
1
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...
2
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...
4
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.