Hi,
Was wondering if someone could help me
If written a conditional format code on VB for a form. The code is 'Select Case' which changes the colour of a rectangle (Box17) depending what is in Field1.
However the problem I'm having is that when I click on a record all the rectangle's change, rather than being specifc to that particular record. For example I would like each record to have a different colour rather than them be all the same.
The picture attached shows the problem I'm having. Level 1 field is green, However level 2 field isnt Red unless I click on it, but then all the rectangles change to red.
Private Sub Form_Current()
Select Case Field1
Case "Level 1"
Box17.Properties("Backcolor") = vbGreen
Case "Level 2"
Box17.Properties("Backcolor") = vbRed
Case "Level 3"
Box17.Properties("Backcolor") = vbYellow
Case "Level 4"
Box17.Properties("Backcolor") = vbBlack
Case Else
Box17.Properties("Backcolor") = vbBlue
End Select
End Sub
Hope this makes sense!
Was wondering if someone could help me
If written a conditional format code on VB for a form. The code is 'Select Case' which changes the colour of a rectangle (Box17) depending what is in Field1.
However the problem I'm having is that when I click on a record all the rectangle's change, rather than being specifc to that particular record. For example I would like each record to have a different colour rather than them be all the same.
The picture attached shows the problem I'm having. Level 1 field is green, However level 2 field isnt Red unless I click on it, but then all the rectangles change to red.
Private Sub Form_Current()
Select Case Field1
Case "Level 1"
Box17.Properties("Backcolor") = vbGreen
Case "Level 2"
Box17.Properties("Backcolor") = vbRed
Case "Level 3"
Box17.Properties("Backcolor") = vbYellow
Case "Level 4"
Box17.Properties("Backcolor") = vbBlack
Case Else
Box17.Properties("Backcolor") = vbBlue
End Select
End Sub
Hope this makes sense!