elburze said:
How do I define values in VB that are stored on C drive and I can close and
reopen the database and values remain until I change them?
This is usually done by using a table. Some people prefer
to use two fields one for the name and the other for the
value. You can then retrieve a single value using a
DLookup:
myvar = DLookup("valvalue", "vartable", "varname='myvar' ")
Other folks prefer to use a one row table with a separate
field for each value. The DLookup in this case would be:
myvar = DLookup("myvar", "vartable")
but this latter approach requires you to mofify the table's
design whenever you need to add another variable.
In either case, if you need to retrieve all the values at
one time, you should open a recordset so you can directly
access the record(s) .
You can set the values by either Executing an Update query
or by opening a recordset and Editing the record(s).