Store a variable

G

Guest

Hi. Is it possible to store a variable outside Access before it shuts down,
and load it when it opens again? I explain:
I have a Public variable that the user must define only one time... then we
use that variable often during the session...
However, when I quit Access the variable becomes null and the user has to
define it again the next time he opens the program...
Is that anyway to avoid this?
Thank you in advance.
Acores
 
R

Rick Brandt

acores said:
Hi. Is it possible to store a variable outside Access before it shuts
down, and load it when it opens again? I explain:
I have a Public variable that the user must define only one time...
then we use that variable often during the session...
However, when I quit Access the variable becomes null and the user
has to define it again the next time he opens the program...
Is that anyway to avoid this?
Thank you in advance.
Acores

The way databases persist values is to store them in tables. Seems like a good
solution. You could store it in the system registry, in a text or ini file, or
in a custom database property, but a table is much simpler than any of those.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top