Filtering Records by Field

M

McCoy

Hi

I have tried to use the followin code to display all records
which meet the user entered criteria,
___________________________________________________________
Private Sub FindCustomerQuote_Click()
On Error GoTo Err_FindCustomerQuote_Click
Dim CusNo As String, CusCode As Long
CusNo = InputBox("Please Enter The Customer Account Number", "Find
Customer Quotes")
CosCode = Val(CusNo)
Me.Filter = "[CustomerNo]=" & CusCode
Me.FilterOn = True




Exit_FindCustomerQuote_Click:
Exit Sub

Err_FindCustomerQuote_Click:
MsgBox Err.Description
Resume Exit_FindCustomerQuote_Click

End Sub
___________________________________________________________

But keep getting the error:

"You Cancelled the previous Operation"



Can anyone suggest what may be causing this and how to fix it.

Is it true that once a filter is run, it will retain the original
values, and if so how do i reset the filter (not sure what im talking
about here) so it will accept the new string values

I would appreciate some help as my IT guy is on holiday again....


hmmm IT guy gets paid twice as much as me for doing jack squat it would seem
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top