Formatting a Textbox from a Combo box

Crackers

Registered User.
Local time
Tomorrow, 07:43
Joined
May 31, 2002
Messages
36
I have a form that has a Combobox containing a '+' and a '-' field.
Next to the combo box I have a text box that when input will contain a dollar amount.
The Form is used as part of my job and there are many operators that will use it. The operators are not the end users of the form therefore it is necessary for the end user to see both the combo box and the textbox; I cannot just use a textbox.
Is it possible to put a code somewhere that when the '-' is selected by an operative, the amount that is entered into the Text box will turn to red thus indicating a negative amount.
I have tried Conditional Formatting but I am not too familiar with its workings.
Your help in this matter would be greatly appreciated. Thank-you.
 
In the after update trigger of the combo box you can do the following

If YourCombobox = "-" Then
yourtextfield.ForeColor = vbRed
Else: yourtextfield.ForeColor = 0

End If
 

Users who are viewing this thread

Back
Top Bottom