I have two fields that change regularly and want to show a different image if Field1 and Field2 are =, <, or > when the values change. I have sucessfully written the code that will work if I take the form to and from design view by placing it in the Form_Current()... I have been unsuccessful in placing in After Update at the field and form level. Code below:
Private Sub Form_Current()
SC1.Visible = False
SR1.Visible = False
SL1.Visible = False
txtCCenter.Visible = False
txtECenter.Visible = False
txtCRight.Visible = False
txtERight.Visible = False
txtCLeft.Visible = False
txtELeft.Visible = False
If txtCBase.Value = txtEBase.Value Then
SC1.Visible = True
txtCCenter.Visible = True
txtECenter.Visible = True
ElseIf txtCBase.Value < txtEBase.Value Then
SR1.Visible = True
txtCRight.Visible = True
txtERight.Visible = True
ElseIf txtCBase.Value > txtEBase.Value Then
SL1.Visible = True
txtCLeft.Visible = True
txtELeft.Visible = True
End If
End Sub
Private Sub Form_Current()
SC1.Visible = False
SR1.Visible = False
SL1.Visible = False
txtCCenter.Visible = False
txtECenter.Visible = False
txtCRight.Visible = False
txtERight.Visible = False
txtCLeft.Visible = False
txtELeft.Visible = False
If txtCBase.Value = txtEBase.Value Then
SC1.Visible = True
txtCCenter.Visible = True
txtECenter.Visible = True
ElseIf txtCBase.Value < txtEBase.Value Then
SR1.Visible = True
txtCRight.Visible = True
txtERight.Visible = True
ElseIf txtCBase.Value > txtEBase.Value Then
SL1.Visible = True
txtCLeft.Visible = True
txtELeft.Visible = True
End If
End Sub