Filter Help

  • Thread starter Thread starter HB2
  • Start date Start date
H

HB2

I want to have a form with one text box. I want to open a form that is
filtered based on the text box.

Any help appreciated...
 
-----Original Message-----
I want to have a form with one text box. I want to open a form that is
filtered based on the text box.

Any help appreciated...

Create a query with the filter you wish, such as a value
or range of values or set of specific values you want to
appear. You do this by creating the query in Design View,
adding the table which contains the field (the textbox)
you wish, then pulling that fieldname into the query
grid. In the criteria row, enter the value you wish to
include with the filter, or if you're trying to exclude,
type NOT (capitals as you see) before the value. If it is
a set of values, you can type IN(then the set of values,
must have capital IN and the parentheses). If, however,
you want to be able to specify each time you run the
filter which value, then type a message in the criteria
row to appear in an alert box within square brackets, such
as [Enter Last Name]. Then, when the query is run, it
will only show the forms holding the value of the Last
Name you typed. To open it in the form, though, now you
need to create a macro, set the action to OpenForm (from
the dropdown list), then go down to the properties,
specify the formname, the type of view (form), and the
filter which is the query you just created. By the way,
you can show several different related fields on the form
at the same time, even only specifying the Last Name, say.
Bernie
 
That worked great. The like* option does not seem to work....any ideas?

Bernie said:
-----Original Message-----
I want to have a form with one text box. I want to open a form that is
filtered based on the text box.

Any help appreciated...

Create a query with the filter you wish, such as a value
or range of values or set of specific values you want to
appear. You do this by creating the query in Design View,
adding the table which contains the field (the textbox)
you wish, then pulling that fieldname into the query
grid. In the criteria row, enter the value you wish to
include with the filter, or if you're trying to exclude,
type NOT (capitals as you see) before the value. If it is
a set of values, you can type IN(then the set of values,
must have capital IN and the parentheses). If, however,
you want to be able to specify each time you run the
filter which value, then type a message in the criteria
row to appear in an alert box within square brackets, such
as [Enter Last Name]. Then, when the query is run, it
will only show the forms holding the value of the Last
Name you typed. To open it in the form, though, now you
need to create a macro, set the action to OpenForm (from
the dropdown list), then go down to the properties,
specify the formname, the type of view (form), and the
filter which is the query you just created. By the way,
you can show several different related fields on the form
at the same time, even only specifying the Last Name, say.
Bernie
 
Back
Top