S
Stephanie
Hi. I am trying to streamline code based on MVP
suggestions. I added "exit sub" so that each condition
will be judged on it's own merits (see snippet below), but
now after clicking "OK", I'm getting notification: "The
DoMenuItem action was canceled". What's that all about?
Is exit sub not the way to go? Thanks, Stephanie
If IsNull(Me!MemberDateName) And (Not IsNull(Option1) Or
Not IsNull(Option2)) Then
iAns = MsgBox("Please enter an 'Associated Since' Date
to continue, or click Cancel to erase this record",
vbOKCancel)
If iAns = vbOK Then
Cancel = True
Me!MemberDateName.SetFocus
Else
Cancel = True
Me.Undo ' erase the entire form
End If
Exit Sub
End If
suggestions. I added "exit sub" so that each condition
will be judged on it's own merits (see snippet below), but
now after clicking "OK", I'm getting notification: "The
DoMenuItem action was canceled". What's that all about?
Is exit sub not the way to go? Thanks, Stephanie
If IsNull(Me!MemberDateName) And (Not IsNull(Option1) Or
Not IsNull(Option2)) Then
iAns = MsgBox("Please enter an 'Associated Since' Date
to continue, or click Cancel to erase this record",
vbOKCancel)
If iAns = vbOK Then
Cancel = True
Me!MemberDateName.SetFocus
Else
Cancel = True
Me.Undo ' erase the entire form
End If
Exit Sub
End If