Problems with error 2001 still...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Mitch (anonymous_at_discussions.microsoft.com)
Date: 09/15/04


Date: Wed, 15 Sep 2004 10:14:57 -0700


..Hi again.

I posted the other week about the error message "Run-time
error 2001 - you cancelled the previous operation" and
someone suggested I check the spelling in the code, qry
and form realted to the problem. I have checked and run
over the problem again but I cannot find any typos that
would throw this error up. Here is the code behind the
form that I am using...

Private Sub cboIssue_AfterUpdate()

Dim strRez As Variant

'strRez = DLookup("[resolution]", "qryRez", "[Issue]=" &
Forms!frmsprt!cboIssue)
strRez = DLookup("[resolution]", "qryRez", "[Issue]='" &
Forms!frmsprt!cboIssue & "'")

If IsNull(strRez) Then
    Me.txtDetail.Visible = True
    Me.sfmResolution.Visible = False
Else
    Me.txtDetail.Visible = False
    Me.sfmResolution.Visible = True
End If

Me.sfmResolution.Requery

End Sub

And the qry is as follows...

SELECT tblIssue.Issue, tblIssue.Resolution
FROM tblIssue
WHERE (((tblIssue.Issue)=[form]![frmsprt]![cboIssue]) AND
((tblIssue.Resolution) Is Not Null));

This should be a very simple function but it is proving
hard to correct !!
Any advice greatly apreciated,

Mitch...



Relevant Pages

  • RE: On Form Error: MsgBox
    ... just the form) I want it to prompt the first prompt in the code below then ... Can you help me modify the below code to prevent the above error message from ... Private Sub Form_Error(DataErr As Integer, Response As Integer) ...
    (microsoft.public.access.formscoding)
  • Re: Custom error message for Runtime error 3022
    ... The standard error message was triggered as soon as the ... Private Sub Form_Error ... Dim strMsg As String ... I don't think the Form Error triggers by runtime errors, ...
    (comp.databases.ms-access)
  • Re: Where to put my Error handling Code
    ... Private Sub Form_Error ... My error message popped up but then I think ... focus needs to be returned to that control so that the user can change it. ... Error event to display the Error number generated when the user violates your ...
    (microsoft.public.access.formscoding)
  • RE: Nested Datagrid spanning columns of Parent Datagrid
    ... The code you posted does not seem like the cause of the error message. ... Public Property CompanyPrimaryKey() As Integer ... Private Sub Page_Load ... "Phillip Williams" wrote: ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Modify the Default Error Msg
    ... Private Sub Form_Error(DataErr As Integer, Response As Integer) ... "CASELOAD Error Message" ... continue!", vbCritical, "Caseload Type Error Message" ...
    (microsoft.public.access.forms)