Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vba variable problem 1

Status
Not open for further replies.

jay2502

Technical User
Apr 20, 2007
25
A2
I have a variable in vba but it defults to zero when i start the database everytime how can i get the database to save it when it closes.
 
How would I Write out and read in the variable? Just an example please
 
I use a table that I call "_system", which is stored in the front end. Its like a hash table, or the Windows Registry. Fields are:

sysGroup optional, helps group similar items.
sysItem A name to look up, eg "MySavedVariable"
sysValue The value of the item, eg "MyVariableValue"

Now you can save the value of your variable in the table, and retrieve as required.

An alternative is to save it to the Registry itself, see GetSetting and SaveSetting methods in Help.

Max Hugen
Australia
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top