I have an unbound form which displays several combo boxes. The combo boxes display a list of employees. Each combo box has an associated subform where on the onLoad of the form and also after update of the combo box, the associated subform's record source changes to reflect the selected employee. Everything is working just fine right now. In the properties of the form I have the default value of each combo box set to a different employee. I want to add a button to the form so the user can change the default values of the combo boxes, so the next time they open the form the employees are rearranged in the order they selected as the new default. For example...
Right now the combo boxes are layed out in a row and default values set as follows:
Employee1 Employee2 Employee3...
Lets say the user changes the combo boxes to the following:
Employee3 Employee1 Employee7 Employee5...
I want to add a button that saves the current "layout"/values of the combo boxes as the new default values, so the next time they open the form it displays Employee3,1,7,5... and not the original Employee1,2,3,4...
A thought I had (which I dont know it would work or even the right way to do it) is OnOpen of the form hard code the default values of each combo box (instead of setting them, in the properties window), then in the onClick of the button write code that changes the hard coded values in the OnOpen event to the current values. Theoretically this would work, but I have never written code that changes code and dont know how to do so. Any help or other suggestions???
Right now the combo boxes are layed out in a row and default values set as follows:
Employee1 Employee2 Employee3...
Lets say the user changes the combo boxes to the following:
Employee3 Employee1 Employee7 Employee5...
I want to add a button that saves the current "layout"/values of the combo boxes as the new default values, so the next time they open the form it displays Employee3,1,7,5... and not the original Employee1,2,3,4...
A thought I had (which I dont know it would work or even the right way to do it) is OnOpen of the form hard code the default values of each combo box (instead of setting them, in the properties window), then in the onClick of the button write code that changes the hard coded values in the OnOpen event to the current values. Theoretically this would work, but I have never written code that changes code and dont know how to do so. Any help or other suggestions???