T
Trini Gal
Hello,
I have the following code and it works fine:
Private Sub L_READING_AfterUpdate()
Dim DISTANCE As Integer
DISTANCE = 10
If L_DISTANCE = DISTANCE Then
READING = L_READING
ElseIf L_DISTANCE < DISTANCE Then
READING = ((L_DISTANCE / DISTANCE) * L_READING)
ElseIf L_DISTANCE > DISTANCE Then
READING = ((L_DISTANCE / DISTANCE) * L_READING)
Else
MsgBox "DISTANCE IS BLANK, PLEASE REVISE."
End If
End Sub
I want to tweek it a little to say:
If reading > 1300 then "Cannot be greater than 1300, please revise."
I tried adding another ElseIf, but its not working. Any help is greatly
appreciated.
Thanks in advance for your time.
I have the following code and it works fine:
Private Sub L_READING_AfterUpdate()
Dim DISTANCE As Integer
DISTANCE = 10
If L_DISTANCE = DISTANCE Then
READING = L_READING
ElseIf L_DISTANCE < DISTANCE Then
READING = ((L_DISTANCE / DISTANCE) * L_READING)
ElseIf L_DISTANCE > DISTANCE Then
READING = ((L_DISTANCE / DISTANCE) * L_READING)
Else
MsgBox "DISTANCE IS BLANK, PLEASE REVISE."
End If
End Sub
I want to tweek it a little to say:
If reading > 1300 then "Cannot be greater than 1300, please revise."
I tried adding another ElseIf, but its not working. Any help is greatly
appreciated.
Thanks in advance for your time.