Re: Public Variables
- From: "Randy Harris" <randy@xxxxxxxxxx>
- Date: Thu, 23 Feb 2006 23:26:22 -0500
"Pierre de Beer" <pierre@xxxxxxxxxxxxxxx> wrote in message
news:OydmrzHOGHA.3924@xxxxxxxxxxxxxxxxxxxxxxx
Hiuse
I store the company name that is displayed on all my forms in a table. I
DLookup("[Company Name]", " Company Details") to retrieve the company nameassigned
from this table. Is it not better to retrieve the company name at startup
and store it to a global variable?
If the variable option is the best, how do I declare a global variable in
Access? I declare the variable in a module but can not get a value
to it.
As you can see I am new at this.
Kind Regards
Pierre
From what you describe, that sounds like a good candidate for a publicconstant.
At the top of a module (not a form or report module):
Public Const CompanyName As String = "My Company Name"
I use this technique for version information that I want to appear on all of
my forms. Just change it in one place when necessary.
--
Randy Harris
tech at promail dot com
I'm pretty sure I know everything that I can remember.
.
- References:
- Public Variables
- From: Pierre de Beer
- Public Variables
- Prev by Date: Opening new form and closing the present one?
- Next by Date: Re: Back up a Split Database's Backend
- Previous by thread: Re: Public Variables
- Next by thread: Re: Dsum for running total
- Index(es):
Relevant Pages
|