Disabling Fields in a form

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.
 
C

Carl Rapson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top