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

Save... option.default change in a form

Status
Not open for further replies.

CCFRED

Programmer
Nov 6, 2004
2
CA
I try this in a form

Option3.DefaultValue = Option3.Value

I want to keep the last state of Option3 for the next time I'll reopen the form.
 
Well, I think you have to first load the value into a variable, then open the form in design mode, then change the default setting, the save the form.



ChaZ
 
ok...but how can I save the state, when the option3 is in the form itself
 
The easiest way is to store the value in a database table.
make a tbl_constants for example, containing 1 row, and store the value of the option on exit in the column option3default
 
As I mentioned, if you open the form in design mode, and make a change, and close the form with save as option, it will take.

Tomvddiun's option also works. Using that method will allow you to use the control's after update event to replace the data in the table, then each new record, not just when it's opened, will always have the last value used.

ChaZ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top