lebanoncedars
Programmer
Hi there,
this is my code listed below for colors for each time I choose an option in my combo box.
So I have:
- Form called "Customer datasheet"
- combo box called "Status"
- Text field called "text0"
What I want to do : is each time i choose one of the options in my combo box, the colors has to change as I set it below and I need the "text0" to display the same option
in the combo box.
this is my code color works well except (texto doesn't display the same words as the combo box).
Private Sub Status_Click()
Select Case Status
Case "To be Dispatched" 'Order to be dispatched
Status.ForeColor = vbBlack
text0.BackColor = vbYellow
text0.ForeColor = vbBlack
Case "Dispatched" 'Order Dispatched
Status.ForeColor = vbBlack
text0.BackColor = vbGreen
text0.ForeColor = vbBlack
Case "Cleared" 'Order cleared
Status.ForeColor = vbBlack
text0.BackColor = vbCyan
text0.ForeColor = vbBlack
Case "Invoiced" 'Order invoiced
Status.ForeColor = vbBlack
text0.BackColor = vbBlue
text0.ForeColor = vbBlack
Case Else
Status.ForeColor = vbWhite
text0.ForeColor = vbWhite
End Select
End Sub
HELP PLEASE, IF ANYONE KNOWS HOW?
DETAILS IF POSSIBEL.
THANKS
Lebanoncedars
this is my code listed below for colors for each time I choose an option in my combo box.
So I have:
- Form called "Customer datasheet"
- combo box called "Status"
- Text field called "text0"
What I want to do : is each time i choose one of the options in my combo box, the colors has to change as I set it below and I need the "text0" to display the same option
in the combo box.
this is my code color works well except (texto doesn't display the same words as the combo box).
Private Sub Status_Click()
Select Case Status
Case "To be Dispatched" 'Order to be dispatched
Status.ForeColor = vbBlack
text0.BackColor = vbYellow
text0.ForeColor = vbBlack
Case "Dispatched" 'Order Dispatched
Status.ForeColor = vbBlack
text0.BackColor = vbGreen
text0.ForeColor = vbBlack
Case "Cleared" 'Order cleared
Status.ForeColor = vbBlack
text0.BackColor = vbCyan
text0.ForeColor = vbBlack
Case "Invoiced" 'Order invoiced
Status.ForeColor = vbBlack
text0.BackColor = vbBlue
text0.ForeColor = vbBlack
Case Else
Status.ForeColor = vbWhite
text0.ForeColor = vbWhite
End Select
End Sub
HELP PLEASE, IF ANYONE KNOWS HOW?
DETAILS IF POSSIBEL.
THANKS
Lebanoncedars