Enable/Disable Textboxes

  • Thread starter Thread starter Tom Bock
  • Start date Start date
T

Tom Bock

On a form, I have 5 check boxes. Under each textbox, I have a bound
control (data type = number).

Depending on the value of the checkbox (true/false), I want to
enable/disable the bound control.

For instance, if a box is checked, then the textbox underneath allows data
entry. If the same checkbox is unchecked, I want to erase the value
entered into the bound textbox AND also disable the bound textbox.

Does anyone know what the code is that I need to put into the AfterUpdate
event for each checkbox?

Thanks,
Tom
 
For instance, if a box is checked, then the textbox
underneath allows data
entry. If the same checkbox is unchecked, I want to erase the value
entered into the bound textbox AND also disable the bound textbox.

Does anyone know what the code is that I need to put into the AfterUpdate
event for each checkbox?

Thanks,
Tom

If Me!chkboxcontrolname = False Then
Me!txtboxcontrolname.Value = Null
Me!txtboxcontrolname.Enabled = False
Else
txtboxcontrolname.Enabled = True
End If

HTH
Kevin Sprinkel
Becker & Frondorf
 
Back
Top