self made filter

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
 
D

Douglas J. Steele

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

(where "whatever" is a valid WHERE clause, without the word WHERE at the
start)
 
G

Guest

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.
 
G

Guest

I have sorted it.

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

Thanks for your help
 

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