G
Guest
I'm trying to enable a textbox and a subform upon a checkbox being checked.
The checkbox defaults to no and other 2 ctrls default to disabled upon form
startup.
I would like the "disabled" state to reset for new records. Right now, if I
check the box and enter data in my 2 ctrls for record 1, when I move to
record 2, the "enabled" states carry over, even though the checkbox is
cleared. Conversely, if I go to record 2 and click on the checkbox twice, I
get the ctrls disabled, but when I move back to record one, even though I
have entered data into the disabled forms and the checkbox remains checked,
the 2 ctrls carry over the disabled state from record 2
I have this code ...
Private Sub extension_AfterUpdate()
Me.num_yrs_prev_funded.Enabled = (Me.extension.Value = True)
Me.IRAD_targeted_programs_subform.Enabled = (Me.extension.Value = True)
End Sub
where num_yrs_prev_funded is the textbox and the other one is obviously the
subform. Extension is the checkbox.
I hope this is clear, but in a nutshell, if a record has been entered and
the checkbox checked, I need the controls to always be enabled. In the case
that the checkbox is not checked (such as a new record especially) I always
want the 2 controls to be disabled?
Am I missing something basic?
Thanks in advance
Keith
The checkbox defaults to no and other 2 ctrls default to disabled upon form
startup.
I would like the "disabled" state to reset for new records. Right now, if I
check the box and enter data in my 2 ctrls for record 1, when I move to
record 2, the "enabled" states carry over, even though the checkbox is
cleared. Conversely, if I go to record 2 and click on the checkbox twice, I
get the ctrls disabled, but when I move back to record one, even though I
have entered data into the disabled forms and the checkbox remains checked,
the 2 ctrls carry over the disabled state from record 2
I have this code ...
Private Sub extension_AfterUpdate()
Me.num_yrs_prev_funded.Enabled = (Me.extension.Value = True)
Me.IRAD_targeted_programs_subform.Enabled = (Me.extension.Value = True)
End Sub
where num_yrs_prev_funded is the textbox and the other one is obviously the
subform. Extension is the checkbox.
I hope this is clear, but in a nutshell, if a record has been entered and
the checkbox checked, I need the controls to always be enabled. In the case
that the checkbox is not checked (such as a new record especially) I always
want the 2 controls to be disabled?
Am I missing something basic?
Thanks in advance
Keith