Hey guys
I have a form with a dropdown box of 78 pc ids
I also have constructed 78 boxes that represent each pc on the floor.
I have also named each rectangle by it's respective Id
so if I have an ID in my dropdown list that was
"AT123456" then I created a box with the name "AT123456"
what I would like to do is When I choose an ID from the drop down list the corresponding rectangle's back color will change black. I do have some code but it doesn't seem to work.
Dim ctrl As Control
For Each ctrl In Form.Controls
Select Case ctrl.ControlType
Case acRetangle:
If ctrl.Name = Me.cbo_Assertag Then
ctrl.BackColor = vbRed
Else
End If
Case Else
End Select
Next ctrl
I have a form with a dropdown box of 78 pc ids
I also have constructed 78 boxes that represent each pc on the floor.
I have also named each rectangle by it's respective Id
so if I have an ID in my dropdown list that was
"AT123456" then I created a box with the name "AT123456"
what I would like to do is When I choose an ID from the drop down list the corresponding rectangle's back color will change black. I do have some code but it doesn't seem to work.
Dim ctrl As Control
For Each ctrl In Form.Controls
Select Case ctrl.ControlType
Case acRetangle:
If ctrl.Name = Me.cbo_Assertag Then
ctrl.BackColor = vbRed
Else
End If
Case Else
End Select
Next ctrl