Why does this code not branch when the user chooses no at the msgbox?
********************************************
Private Sub Command6_Click()
'Already A survey for this employer?
If DCount("*", "qryCheckForPreviousSurvey") > 0 Then
MsgBox "A survey for this account number already exists. Would you like to go ahead anyway?", vbYesNo
End If
If vbYesNo = vbNo Then GoTo LastLine
' tell the user that you are working
DoCmd.OpenForm "frmPreLoadWait"
******************************************
There is a line at the end of the code, just before end sub,
"LastLine :"
Thanks,
Dave
********************************************
Private Sub Command6_Click()
'Already A survey for this employer?
If DCount("*", "qryCheckForPreviousSurvey") > 0 Then
MsgBox "A survey for this account number already exists. Would you like to go ahead anyway?", vbYesNo
End If
If vbYesNo = vbNo Then GoTo LastLine
' tell the user that you are working
DoCmd.OpenForm "frmPreLoadWait"
******************************************
There is a line at the end of the code, just before end sub,
"LastLine :"
Thanks,
Dave