On my form I am submitting a query and when it runs I get messages from the completion. I put the SetWarnings False and True in to end the messages. Now when it runs I get a different message that says:
"You Canceled the previous operation" and wants me to reply 'OK'
Can someone tell me why I get this and how to stop it. I don't remenber every getting this prior to putting the setwarnings in but now I get even when I remove them.
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenQuery "InsertNewProspects", acViewNormal, acAdd
DoCmd.RunCommand acCmdSaveRecord
DoCmd.SetWarnings True
If Not IsNull(Me.txtCaseTrackNbr) Then
strLinkCriteria = "[Case Track Nbr] = '" & Me.txtCaseTrackNbr & "'"
End If
If Me.txtCaseType = "MED" Then
DoCmd.OpenForm FormName:="frmMedProspects"
Form!frmMEDProspects.Filter = strLinkCriteria
Form!frmMEDProspects.FilterOn = True
Else
DoCmd.OpenForm FormName:="frmSBDProspects"
Form!frmSBDProspects.Filter = strLinkCriteria
Form!frmSBDProspects.FilterOn = True
End If
"You Canceled the previous operation" and wants me to reply 'OK'
Can someone tell me why I get this and how to stop it. I don't remenber every getting this prior to putting the setwarnings in but now I get even when I remove them.
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenQuery "InsertNewProspects", acViewNormal, acAdd
DoCmd.RunCommand acCmdSaveRecord
DoCmd.SetWarnings True
If Not IsNull(Me.txtCaseTrackNbr) Then
strLinkCriteria = "[Case Track Nbr] = '" & Me.txtCaseTrackNbr & "'"
End If
If Me.txtCaseType = "MED" Then
DoCmd.OpenForm FormName:="frmMedProspects"
Form!frmMEDProspects.Filter = strLinkCriteria
Form!frmMEDProspects.FilterOn = True
Else
DoCmd.OpenForm FormName:="frmSBDProspects"
Form!frmSBDProspects.Filter = strLinkCriteria
Form!frmSBDProspects.FilterOn = True
End If