On a continuous form I have 2 controls tblStatusName and tblPCCustomerName
I am trying to set the backcolor for each tblCustomerName based on the first character of the tblStatusName
The following sets the backcolor to ALL tblPCCustomerName controls to Red
I'm stumped and could use some help
TIA
I am trying to set the backcolor for each tblCustomerName based on the first character of the tblStatusName
The following sets the backcolor to ALL tblPCCustomerName controls to Red
I'm stumped and could use some help
TIA
Code:
Private Sub Form_Load()
Dim strStatus As String
strStatus = Left(Me.tblStatusName, 1)
Select Case strStatus
Case 0 To 1
'Left(Me.tblStatusName, 1) = "0"
'Left(Me.tblStatusName, 1) = "1"
Me.tblPCCustomerName.BackColor = rgb(255, 255, 0)
Case 2 To 4
'Left(Me.tblStatusName, 1) = "2"
'Left(Me.tblStatusName, 1) = "3"
'Left(Me.tblStatusName, 1) = "4"
Me.tblPCCustomerName.BackColor = rgb(255, 204, 0)
Case 6
'Left(Me.tblStatusName, 1) = "6"
Me.tblPCCustomerName.BackColor = rgb(153, 204, 0)
Case Else
'Left(Me.tblStatusName, 1) = ""
Me.tblPCCustomerName.BackColor = rgb(255, 0, 0)
End Select
End Sub