M
Mitch
...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...
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...