<html>
<body>
I have a button on a form which is used to filter the records.  The
code is -<br><br>
Private Sub cmdCustomerFilter_Click()<br><br>
    On Error GoTo Err_cmdCustomerFilter_Click<br>
    <br>
    If Me!cmdCustomerFilter.Caption = "Show
Active" Then<br>
        Me.RecordSource = "EXEC
spfrmCustomers @AccStatus = 'Active'"  <- Problem line<br>
        Me!cmdCustomerFilter.Caption =
"Show All"<br>
    Else<br>
        Me.RecordSource = "EXEC
spfrmCustomers @AccStatus='%'"<br>
        Me!cmdCustomerFilter.Caption =
"Show Active"<br>
    End If<br>
.....    <br>
    <br>
End Sub<br><br>
In the sproc the parameter is -<br><br>
<font face="tahoma">@AccStatus varchar(20) = '%'<br><br>
</font>When I click on the button I get error 2353 - Bad query
parameter.  I can run the query in Query analyser and it runs
ok.<br><br>
If I leave the @AccStatus = 'Active' off then a message appears telling
me that the procedure expects the parameter (so this tells me it is
calling the correct sproc)<br><br>
I think the problem is in the call but can't put my finger on it. 
Any help?<br><br>
<x-sigsep><p></x-sigsep>
Regards<br><br>
David Emerson<br>
DALYN Software Ltd<br>
25b Cunliffe St, Johnsonville<br>
Wellington, New Zealand<br>
Ph/Fax (877) 456-1205</body>
</html>