Disabling Fields in a form

  • Thread starter Thread starter Wes
  • Start date Start date
W

Wes

Hello. I have a form that allows me to enter withdraws and deposits.
I make a selection of the type of transaction from a combo box whether
it is a deposit or withdraw. I want to setup my form to disable the
deposit amount field if I select withdraw, and vice versa for
deposits.

Thanks for the help.
 
Wes said:
Hello. I have a form that allows me to enter withdraws and deposits.
I make a selection of the type of transaction from a combo box whether
it is a deposit or withdraw. I want to setup my form to disable the
deposit amount field if I select withdraw, and vice versa for
deposits.

Thanks for the help.

In the AfterUpdate event of the combo box:

If Me.cboComboBox = "deposit" Then
Me.txtWithdrawField.Enabled = False
Me.txtDepositField.Enabled = True
ElseIf Me.cboComboBox = "withdraw" Then
Me.txtWithdrawField.Enabled = True
Me.txtDepositField.Enabled = False
Else
' Any other options
End if

Carl Rapson
 
Back
Top