|
 |
access thread: public static variables
Message #1 by "wilfred van casteren" <vancasterenw@a...> on Tue, 17 Jul 2001 22:25:06
|
|
I want to keep a vatiable public and when i close the database and reopen
it i want to have the same value for this variable. It can change during
usage of the db.
Thanks
Wilfred
Message #2 by "Pardee, Roy E" <roy.e.pardee@l...> on Tue, 17 Jul 2001 14:37:49 -0700
|
|
Sounds like a candidate for a registry key--have a look at help for the
SaveSetting() and GetSetting() functions.
hth,
-Roy
-----Original Message-----
From: wilfred van casteren [mailto:vancasterenw@a...]
Sent: Tuesday, July 17, 2001 3:25 PM
To: Access
Subject: [access] public static variables
I want to keep a vatiable public and when i close the database and reopen
it i want to have the same value for this variable. It can change during
usage of the db.
Thanks
Wilfred
Message #3 by Brian Skelton <brian.skelton@b...> on Tue, 17 Jul 2001 22:41:32 +0100
|
|
Hi Wilfred
You've two options:
1) Create a user defined property for your database. You'll need to
write the code to create this property and keep the value updated (Have
a look at the 'Properties Collection' in the Access help.
2) Create your own Registry entry. Again, you'll need to write code,
using Windows API calls, to create the key and update it. Be careful
with this one. I'm sure that you know that making a mistake whilst
fiddling with the registry could kill you whole system!
Good luck!
-BDS
Message #4 by "Ray Pinnegar" <r.pinnegar@b...> on Wed, 18 Jul 2001 17:28:57
|
|
Just looking at the list of answers to your problem - all seem complicated.
I use a very old fashioned programming technique - but it works!
Create a simple 1 record table called "Common" and create a field for each
of the carry over variables. Open it at any time you want to use it, or
Open it immediately and transfer values to Public Variables. Update and
close as required.
I use for things like Last Invoice No.
Hope this helps -I'm a simple soul.
Cheers Ray
> I want to keep a vatiable public and when i close the database and
reopen
> it i want to have the same value for this variable. It can change during
> usage of the db.
>
>
> Thanks
>
> Wilfred
|
|
 |