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

initializing variables

I'm new to Access 97.

Where's the best place to initialize global variables that are
established in the declarations area?
Nov 13 '05 #1
8 4169
Do rememmber that any un-trapped exection error will destroy ALL global vars
(you can distriubte a mde to your users..and this will NOT reset all
vriables).

The best palce is that in your main startup form, in the on-load event, you
can call a "mainsetup" routine that is simply code in standard module.

So, you can go

Call MyStartUP

And, in a modue, you have

Public Sub MyStartUP

gblUserName = currentUser()
gblcurTaxRate = 0.07

etc.

end sub
"Weaver" <we*****@verizon.net> wrote in message
news:66*************************@posting.google.co m...
I'm new to Access 97.

Where's the best place to initialize global variables that are
established in the declarations area?

Nov 13 '05 #2
Thanks for this. I had no knowledge of the untrapped errors problem.


"Albert D. Kallal" <Pl*******************@msn.com> wrote in message news:<w5p_c.318369$gE.280531@pd7tw3no>...
Do rememmber that any un-trapped exection error will destroy ALL global vars
(you can distriubte a mde to your users..and this will NOT reset all
vriables).

The best palce is that in your main startup form, in the on-load event, you
can call a "mainsetup" routine that is simply code in standard module.

So, you can go

Call MyStartUP

And, in a modue, you have

Public Sub MyStartUP

gblUserName = currentUser()
gblcurTaxRate = 0.07

etc.

end sub
"Weaver" <we*****@verizon.net> wrote in message
news:66*************************@posting.google.co m...
I'm new to Access 97.

Where's the best place to initialize global variables that are
established in the declarations area?

Nov 13 '05 #3

"Weaver" <we*****@verizon.net> wrote in message
news:66**************************@posting.google.c om...
Thanks for this. I had no knowledge of the untrapped errors problem.

It is not a problem for good developers because good developers always trap
errors.
Nov 13 '05 #4
"XMVP" <ac***********@hotmail.com> wrote
It is not a problem for good developers
because good developers always trap
errors.


You've been caught sniping again, Donnie.

If you'd provide useful answers to some real questions in this newsgroup,
your pronouncements might get some respect. Given your behavior here,
though, how can you expect anyone to think other than "What would the
Resident Troll know about 'good developers'?"
Nov 13 '05 #5
On 4 Sep 2004 23:55:35 -0700, we*****@verizon.net (Weaver) wrote:
Thanks for this. I had no knowledge of the untrapped errors problem.

One way of avoiding global variables being cleared by errors is to use
controls on a global form instead.
David Schofield
Nov 13 '05 #6

"Larry Linson" <bo*****@localhost.not> wrote in message
news:uRO_c.2754$x12.221@trnddc05...

Larry the Lickass, picks through the posts
Where a newsgroup had been.
Lives in a dream.
Waits at his PC, wearing the thong
That he keeps on a hook by the door.
Who is it for?

All the Access homos,
Where do they all come from?
All the Access homos,
Where do they all belong?
Nov 13 '05 #7
"Phil Kitchner" <ph*****@hotmail.com> wrote:
Message-ID: <mp*******************@hydra.nntpserver.com>


Please ignore the above posting and others which are somewhat bizarre.

Note to persons new to this newsgroup. One person, with many identities, is being
rather disruptive. If you see a bizarre posting it's probably the work of this
disruptive person..

Check the headers of the posting. If you see the following the posting likely can be
ignored. Of course, there will likely be other headers to be added to this list.

Comments: This message did not originate from the Sender address above.
It was remailed automatically by anonymizing remailer software.
or
X-Abuse-Report: ab***@teranews.com
or
Organization: Posted via Supernews, http://www.supernews.com
or
Organization: 100ProofNews.com - Unlimited Downloads - $8.95/Month
or
X-Complaints-To: ab***@vnet-inc.com
or
Message-ID: <something>.nntpserver.com

You can also change your NewsReader program settings to ignore off-topic posts. See
http://www.hyphenologist.co.uk/killfile/ for more information.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #8

"Tony Toews" <tt****@telusplanet.net> wrote in message
news:tv********************************@4ax.com...
Tony the Twinkie, pasting together
The words of a post that no one will hear.
No one comes near.
Look at him working, pulling his pud
In the night when there's nobody there.
What does he care?

All the Access homos,
Where do they all come from?
All the Access homos,
Where do they all belong?
Nov 13 '05 #9

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

Similar topics

2
by: Dave | last post by:
Hello all, I have a class that contains a large number of discrete pieces of state information. Any combination of these member variables might be valid for a given object. Any given member...
1
by: Andreas Boehm | last post by:
Hi *.*, does the standard meanwhile define something about initializing variables by the compiler? I think, it is a side-effect of the OS used, if undefined global (static) variables are...
5
by: jyu.james | last post by:
Is there an easy way to specify that global variables be initialized to something else besides zero? Specifically, I have a project that has many global variables spread across many files. I...
0
by: Adam Smith | last post by:
Are there any drawbacks to initializing static member variables for classes used in an asp.net application within application_start? My classes have arraylist like tables, which cache information...
17
by: Calle Pettersson | last post by:
Coming from writing mostly in Java, I have trouble understanding how to declare a member without initializing it, and do that later... In Java, I would write something like public static void...
6
by: alacrite | last post by:
If I have this situation class X { Z z; Y y; }; Class X has two objects of type Z and Y. How do I initialize z and y with non default constructors?
2
by: eriwik | last post by:
Given a simple class like class test { private: size_t size_; int* data_; public: test(size_t s) : size_(s), data_(new int { /* ... */ };
14
by: Sugandh Jain | last post by:
Hi, The warning from Microsoft.Performance Code Analysis check that, its not required to initialize numeric variables to zero, boolean to false and object to null is a good one because CLR does...
8
by: SM | last post by:
I've always wonder if there is diference when declaring and initializing a varible inside/outside a loop. What's a better practice? Declaring and initializing variables inside a loop routine,...
10
by: Jason Doucette | last post by:
Situation: I have a simple struct that, say, holds a color (R, G, and B). I created my own constructors to ease its creation. As a result, I lose the default constructor. I dislike this, but...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...

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.