self made filter

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have created a form which displays a persons personal details. Also
within this form are several subfroms which display other things linked to to
person. I would like to know if it is possible to have unbound text boxes on
the form that can form a "search facility". Rather than have the unbound
textboxes as criteria in my query I would like to use them in a similar
fashion to the filter by form option. Idealy by typing in the boxes what the
user wants to search for and then click a buttion to search for the
record(s). Is there a way to set the filter property to something in a text
box and then turn it on?

Thanks
 
Me.Filter = "whatever"
Me.FilterOn = True

(where "whatever" is a valid WHERE clause, without the word WHERE at the
start)
 
Thanks, I am trying to use

Me.Filter = searchpc.value
Me.FilterOn = True

searchpc is the name of my text box but when I execute this it is not
filtering anything.
 
I have sorted it.

Used
Me.Filter = "([Person Code] = " & Me.searchpc & ")"
Me.FilterOn

Thanks for your help
 
Back
Top