D
DanJ
I want to set the Default value property of a control on an unbound dialog
form when the user checks a checkbox on the form. The dialog form has 2
unbound text box controls and a 'continue' button. The user can enter values
in the text box controls or leave the default values that appear when the
form opens. If the user checks a check box, I would like to change the
Default values of the text box controls to whatever the user entered so that
the next time the dialog form opens the new default values are entered 'by
default'.
In the cmdPrint.Click event of the form I have the following:
.. . .
If Me.Check8 = True Then
Me.txtHorzCnt.DefaultValue = Me.txtHorzCnt.Value
Me.txtVertCnt.DefaultValue = Me.txtVertCnt.Value
End If
DoCmd.Close acForm, Me.Name, acSaveYes
.. . .
For some reason, when the form closes, it is not saving the new default
values.
form when the user checks a checkbox on the form. The dialog form has 2
unbound text box controls and a 'continue' button. The user can enter values
in the text box controls or leave the default values that appear when the
form opens. If the user checks a check box, I would like to change the
Default values of the text box controls to whatever the user entered so that
the next time the dialog form opens the new default values are entered 'by
default'.
In the cmdPrint.Click event of the form I have the following:
.. . .
If Me.Check8 = True Then
Me.txtHorzCnt.DefaultValue = Me.txtHorzCnt.Value
Me.txtVertCnt.DefaultValue = Me.txtVertCnt.Value
End If
DoCmd.Close acForm, Me.Name, acSaveYes
.. . .
For some reason, when the form closes, it is not saving the new default
values.