RexesOperator
Registered User.
- Local time
- Today, 03:44
- Joined
- Jul 15, 2006
- Messages
- 604
I'm trying to enable/disable text boxes in a subform with a command button on the subform. The initial condition is Disabled. Thus one click should enable the textbox and the next click should disable it.
I used this format for the code from an earlier post of mine:
If Forms!frmTrxns.ctlTrxnSub.Form.txtJANDRY2pt5PerCent.Enabled = False Then
Forms!frmTrxns.ctlTrxnSub.Form.txtJANDRY2pt5PerCent.Enabled = True
Else
Forms!frmTrxns.ctlTrxnSub.Form.txtJANDRY2pt5PerCent.Enabled = False
End If
(there are no spaces in PerCent - that's a forum thing)
With the initial condition Disabled, one click will enable the fields, but the next click won't disable them again. And vice versa - enabled fields will be disabled with one click, but I can't enable them with the second click.
Do I have to build a separate procedure to redisable/reenable the fields?
I used this format for the code from an earlier post of mine:
If Forms!frmTrxns.ctlTrxnSub.Form.txtJANDRY2pt5PerCent.Enabled = False Then
Forms!frmTrxns.ctlTrxnSub.Form.txtJANDRY2pt5PerCent.Enabled = True
Else
Forms!frmTrxns.ctlTrxnSub.Form.txtJANDRY2pt5PerCent.Enabled = False
End If
(there are no spaces in PerCent - that's a forum thing)
With the initial condition Disabled, one click will enable the fields, but the next click won't disable them again. And vice versa - enabled fields will be disabled with one click, but I can't enable them with the second click.
Do I have to build a separate procedure to redisable/reenable the fields?