Hi,
yes, this quite strange error. Try to comment out these lines and then
compile the project, perhaps there is some other error as well. And of
course check that all references in place
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
"Sailor" <(E-Mail Removed)> wrote in message
news:0336F0EC-91C5-4B6C-8128-(E-Mail Removed)...
> Thanks for the prompt reply.
>
> Me.Filter results in "Invalid Use of Property" message at compile with the
> work Filter highlighted. Could there be a problem with the references?
>
> Sailor
>
> "Alex Dybenko" wrote:
>
>> Hi,
>> try to use:
>> me.Filter= "[Complaint_Number] = " & CNUM
>> me.FilterOn=true
>>
>> instead of DoCmd.ApplyFilter
>>
>> --
>> Best regards,
>> ___________
>> Alex Dybenko (MVP)
>> http://accessblog.net
>> http://www.PointLtd.com
>>
>> "Sailor" <(E-Mail Removed)> wrote in message
>> news:EF01E0E3-19CB-4D87-8779-(E-Mail Removed)...
>> > 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
>>
>>