By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,615 Members | 1,961 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,615 IT Pros & Developers. It's quick & easy.

initializing variables

P: n/a
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
Share this Question
Share on Google+
8 Replies


P: n/a
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

P: n/a
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

P: n/a

"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

P: n/a
"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

P: n/a
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

P: n/a

"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

P: n/a
"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

P: n/a

"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 discussion thread is closed

Replies have been disabled for this discussion.