S
Sailor
Using the following code, I want to apply a filter to an open form to lookup
a value entered by the operator in the header of the form:
Dim CNUM As Long
On Error GoTo errh1
If IsNull([CMPNum]) Or [CMPNum] = "" Then
Exit Sub
End If
CNUM = [CMPNum]
DoCmd.ApplyFilter "CMP-Action lookup filter", "[Complaint_Number] = " & CNUM
The saved filter is a query containing 4 tables, one of which has the field
Complaint_Number defined. When the ApplyFilter code executes, it displays a
message box "Enter parameter value" asking for the Complaint_Number.
Why is the message box appearing?
Thanks for your help!
Sailor
a value entered by the operator in the header of the form:
Dim CNUM As Long
On Error GoTo errh1
If IsNull([CMPNum]) Or [CMPNum] = "" Then
Exit Sub
End If
CNUM = [CMPNum]
DoCmd.ApplyFilter "CMP-Action lookup filter", "[Complaint_Number] = " & CNUM
The saved filter is a query containing 4 tables, one of which has the field
Complaint_Number defined. When the ApplyFilter code executes, it displays a
message box "Enter parameter value" asking for the Complaint_Number.
Why is the message box appearing?
Thanks for your help!
Sailor