I am using some simple code (below) to toggle the back ground color of text boxes.
Case "EPA Stations"
With Forms!NXT_locator!E1
.BackColor = (IIf(.BackColor = vbYellow, vbGreen, vbYellow))
With Forms!NXT_locator!E2
.BackColor = (IIf(.BackColor = vbYellow, vbGreen, vbYellow))
With Forms!NXT_locator!E3
.BackColor = (IIf(.BackColor = vbYellow, vbGreen, vbYellow))
End With
End With
End With
This works great if you only have a few, But they all toggle at once. What I need is to select an item from a combo box, and have only the selection toggle. I need to use a variable to represent the item selected and change only that item. Any suggestions?
Case "EPA Stations"
With Forms!NXT_locator!E1
.BackColor = (IIf(.BackColor = vbYellow, vbGreen, vbYellow))
With Forms!NXT_locator!E2
.BackColor = (IIf(.BackColor = vbYellow, vbGreen, vbYellow))
With Forms!NXT_locator!E3
.BackColor = (IIf(.BackColor = vbYellow, vbGreen, vbYellow))
End With
End With
End With
This works great if you only have a few, But they all toggle at once. What I need is to select an item from a combo box, and have only the selection toggle. I need to use a variable to represent the item selected and change only that item. Any suggestions?