filtering a form "on-the-fly"

mihabaki

Registered User.
Local time
Today, 17:27
Joined
Jul 14, 2005
Messages
48
Hi

I have a form "frmForm1" and a subform "frmForm2". On the form there is an unbounded textfiled "strText" and a command button "cmdButton". I would like to filter the form "on-the-fly" by clicking the cbutton.

my textfiled relates to one field in the subform...

is it possible to do this?

I would be very grateful for a piece of an example code wich I could use...

thank you
m.
 
Filter

Create a query that your main form uses as it's Data Source. In that query under criteria set that field equal to forms![Mainform].[strtext]. This way the form and sub form will only display the data you enter in that text field. Once the user types in the info in that text field have a command button with the code under On Click to be Me.requery. Both the form and subform will then display the desired information.
 
thank you very much!

I think this will do just fine... :)

Miha
 
filter by multiple criteria

In my subform, I'd like to allow users to select criteria for filtering the results. I read many threads in this forum, but it seems them filter can only be used for
"and". I hope I am wrong. I want to apply two criteria (say, "or") to the filter... is it possible?

:confused:
 
filter by multiple criteria

In my subform, I'd like to allow users to select criteria for filtering the results. I read many threads in this forum, but it seems them filter can only be used for
"and". I hope I am wrong. I want to apply two criteria (say, "or") to the filter... is it possible?

:confused:
 

Users who are viewing this thread

Back
Top Bottom