I have a form (form1 in the sample code below) with three combo boxes. I set each combo box to have a specific default value. However, I want to give the user the ability to reset the default values. I accomplished this by creating a pop-up (form2 in the sample code below) form that has the identical combo boxes (without default values). They can select from the pull-down menus, click a button. Behind the button is the following code:
forms!form1!cbo1 = me.cboA
forms!form1!cbo2 = me.cboB
forms!form1!cbo3 = me.cboC
docmd.close acform, "form1", acSaveYes
docmd.close acform, "form2"
It works fine, the only problem is that when I close the original form, then open it again, all of the combo boxes have the original default values. It is like the new default values that the user selects don't "stick."
What am I doing wrong?
forms!form1!cbo1 = me.cboA
forms!form1!cbo2 = me.cboB
forms!form1!cbo3 = me.cboC
docmd.close acform, "form1", acSaveYes
docmd.close acform, "form2"
It works fine, the only problem is that when I close the original form, then open it again, all of the combo boxes have the original default values. It is like the new default values that the user selects don't "stick."
What am I doing wrong?