Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I remove a filter from a form using code? 1

Status
Not open for further replies.

mlrmlr

Technical User
Mar 17, 2006
168
US
Hello,

What method can I use to clear or remove a filter?

I have an unbound combo box attached to a form which is used to filter selected work order numbers. The filter works great but I need a method to clear the filter in order to perform additional filters.

I would like to attaché the code to a button on the “On Click” event.

 
How are ya mlrmlr . . .
Code:
[blue]   me.FilterOn=False[/blue]

Calvin.gif
See Ya! . . . . . .
 
Hi AceMan1!

Thanks for responding so quick.

I placed your code in my "On Click" event, but it did not work. :-(

 
The filter works great
How is it implemented ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi PHV,

I placed the code in a button (On Click).

I have a form that displays a list of work orders. On the form, I have a combobox that filters the work orders by the work order number field (wo_num). The filter works pretty good, but I need a way to release the filter to redisplay all of the work orders so that the users can perform additional filters.

I hope I answered your question.
 
I hope I answered your question
Nope, sorry.
How does the combo filter the form ?
Some code in some event procedure of the combo ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Soooo sorry!

Here is the code in the "After Update" event.

<CODE>
Private Sub cboWOInfo_AfterUpdate()

Me.RecordSource = "SELECT * FROM WO_Info WHERE WO_Info.WO_Num ='" & cboWOInfo & "';"

End Sub
<CODE>
 
In your "On Click" event:
Me.RecordSource = "SELECT * FROM WO_Info"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV,

You are the BEST!!!!

Thanks so much for your help. [2thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top