lebanoncedars
Programmer
Hi guys,
Any one knows how to assign an option action to one record ONLY at the time.
I have: Continous form Called "Customer datasheet"
Combo Box Called "Sattus" and has four options in it:
- Dispatched
- Pickup Up
- Cleared
- to be Invoiced
and one text field Called "tex0"
I need when I click on one of the record on my continous form "Customer datasheet" and choose the option in my combo box "Status", I want "text0" field to change color and name.
It means the names are the options in my combo box.
and the colors is located in the code I create.
Yake a look at it:
Private Sub Status_Click()
Status.ForeColor = vbBlack
text0.ForeColor = vbVlack ' text0 is the text field name
text0 = Status 'Status is the combo box name
Select Case Me.Status
Case "Dispatched" 'Order dispatched
text0.BackColor = vbRed
text0.ForeColor = vbBlack
Me.text0 = "Dispatched"
Case "Picked Up" 'Order Picked Up
text0.BackColor = vbGreen
text0.ForeColor = vbBlack
Me.text0 = "Picked Up"
Case "Cleared" 'Order cleared
text0.BackColor = vbCyan
text0.ForeColor = vbBlack
Me.text0 = "Cleared"
Case "to be Invoiced" 'Order to be invoiced
text0.BackColor = vbBlue
text0.ForeColor = vbBlack
Me.text0 = "to be Invoiced"
Case Else
Status.ForeColor = vbWhite
text0.ForeColor = vbWhite
End Select
End Sub
I need help Please with that.
The problem is now the color is applying on the column of the text field name "text0" in all the records in my continous form instead changing ONLY the color on "text0" in one record. and the ONLY record I choose to change.
THanks
lebanoncedars
Any one knows how to assign an option action to one record ONLY at the time.
I have: Continous form Called "Customer datasheet"
Combo Box Called "Sattus" and has four options in it:
- Dispatched
- Pickup Up
- Cleared
- to be Invoiced
and one text field Called "tex0"
I need when I click on one of the record on my continous form "Customer datasheet" and choose the option in my combo box "Status", I want "text0" field to change color and name.
It means the names are the options in my combo box.
and the colors is located in the code I create.
Yake a look at it:
Private Sub Status_Click()
Status.ForeColor = vbBlack
text0.ForeColor = vbVlack ' text0 is the text field name
text0 = Status 'Status is the combo box name
Select Case Me.Status
Case "Dispatched" 'Order dispatched
text0.BackColor = vbRed
text0.ForeColor = vbBlack
Me.text0 = "Dispatched"
Case "Picked Up" 'Order Picked Up
text0.BackColor = vbGreen
text0.ForeColor = vbBlack
Me.text0 = "Picked Up"
Case "Cleared" 'Order cleared
text0.BackColor = vbCyan
text0.ForeColor = vbBlack
Me.text0 = "Cleared"
Case "to be Invoiced" 'Order to be invoiced
text0.BackColor = vbBlue
text0.ForeColor = vbBlack
Me.text0 = "to be Invoiced"
Case Else
Status.ForeColor = vbWhite
text0.ForeColor = vbWhite
End Select
End Sub
I need help Please with that.
The problem is now the color is applying on the column of the text field name "text0" in all the records in my continous form instead changing ONLY the color on "text0" in one record. and the ONLY record I choose to change.
THanks
lebanoncedars