Reset default value

Acke

Registered User.
Local time
Today, 01:32
Joined
Jul 1, 2006
Messages
158
How can I change default value to an unbound control?

I would like to avoid using table if possible.

Code control name.defaultvalue = -1 works fine, but when I close the form and open it again, new default value is not saved.
 
To set a value via code and then to expect it to be the same when you reopen, without either opening the form in design mode, saving it, and then closing it, or storing the value in a table and having the form's load event set the value when the database is opened, then it won't work.

You have to store the value somewhere. The most logical place is in a hidden table. But, you can also save it in a text file or in the computer's registry. That requires a bit more to do, but it's possible to do.
 

Users who are viewing this thread

Back
Top Bottom