Would there be a easier method then this?
Code:
'Pacer frame set to proper background
If Me.FrmPacer.Value = 1 Then
Me.LblPacer.BackColor = vbGreen
ElseIf Me.FrmPacer.Value = 2 Then
Me.LblPacer.BackColor = vbYellow
ElseIf Me.FrmPacer.Value = 3 Then
Me.LblPacer.BackColor = vbRed
ElseIf Me.FrmPacer.Value = 0 Then
Me.LblPacer.BackColor = vbWhite
Me.LblPacer.FontWeight = normal
ElseIf Me.FrmPacer.Value = Null Then
Me.LblPacer.BackColor = vbWhite
Me.LblPacer.FontWeight = normal
End If
'neuro frame set to proper background
If Me.FrmNeuroStim.Value = 1 Then
Me.LblNeurostim.BackColor = vbGreen
ElseIf Me.FrmNeuroStim.Value = 2 Then
Me.LblNeurostim.BackColor = vbYellow
ElseIf Me.FrmNeuroStim.Value = 3 Then
Me.LblNeurostim.BackColor = vbRed
ElseIf Me.FrmNeuroStim.Value = 0 Then
Me.LblNeurostim.BackColor = vbWhite
Me.LblNeurostim.FontWeight = normal
ElseIf Me.FrmNeuroStim.Value = Null Then
Me.LblNeurostim.BackColor = vbWhite
Me.LblNeurostim.FontWeight = normal
End If
I have multiple frames on one subform that when selected sets a unassociated labels back color. Then when cancelled by undo code the back color stays on the color that it was changed to on afterupdate event from the frame with option controls. I would like to loop thru but could not come up with the proper method if it is even possible. Just looking for a shorter approach. the above code works after refreashed, but just wondering if there is a shorter or more efficient method. Any ideas or different approach would be greatly appreciated
Thank you for your time.
just a small clip of the form