T
TeeSee
Private Sub SiScode_AfterUpdate()
If Me.Indicator.Value <> 0 Then _
GoTo LeaveSub Else _
MsgBox "You MUST select whether you are adding to VMI or billing
CD before proceeding", , "PAY ATTENTION!"
End If ' This is "END IF #1"
If (Me.Dirty = True) Then
' Clear it
Me.Undo
End If
Me.SiScode.SetFocus
LeaveSub:
End If ' This is "END IF #2"
End Sub
I originally made the mistake of placing the END IF #2 and got a
compile error referencing block if issue. Searched the group and felt
that I found the answer from Marsh saying that each if/end is
indepenent of each other. I then moved the end if to position END IF
#1 and still get the same compile error. The strange thing to me is
that without either of those two end ifs the code compiles and runs as
expected.
Do you actually require an end if in this set of circumstances??
If Me.Indicator.Value <> 0 Then _
GoTo LeaveSub Else _
MsgBox "You MUST select whether you are adding to VMI or billing
CD before proceeding", , "PAY ATTENTION!"
End If ' This is "END IF #1"
If (Me.Dirty = True) Then
' Clear it
Me.Undo
End If
Me.SiScode.SetFocus
LeaveSub:
End If ' This is "END IF #2"
End Sub
I originally made the mistake of placing the END IF #2 and got a
compile error referencing block if issue. Searched the group and felt
that I found the answer from Marsh saying that each if/end is
indepenent of each other. I then moved the end if to position END IF
#1 and still get the same compile error. The strange thing to me is
that without either of those two end ifs the code compiles and runs as
expected.
Do you actually require an end if in this set of circumstances??