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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to preserve a value after closing the database 1

Status
Not open for further replies.

jamaarneen

Programmer
Dec 27, 2007
212
BE


Hi

Is there a possibility to preserve a value after closing the DB - other then storing it in a table?

I have an 'option group' on a form, what hes value is been put to a global variable. I would like to keep the choice the user made , for the next time he is opening the database. how can this be saved for the next time?

Thanks,
Ja
 
Thanks Remou, this worked out (with a little home work of mine).

But i still want to understand: I tried in the 'AfterUpdate' event OptionGroup, to change his 'DefaultValue' , so it should open next time with this value, and it DID NOT work.

Why?

Thanks
ja
 
you can change it in form view, but the change only persists while the form is opened. This is the same for most form properties. Some properties cannot be modified in form view. You would have to go to design view make the change then close the form.

If you want to do that method the normal trick is open it in desingn view and hiddent, save, then close.
 
AFAIK you cannot set the default value at runtime so that it changes the design of the form. You would have to set the form to design view, and this would then prevent you creating an mde. It is not generally a good idea to switch anything to design view in a completed application.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top