Search button

  • Thread starter Thread starter KR
  • Start date Start date
K

KR

Hi, I have a simple one table database for photo equip. I want to make a
form that will have a search button on it with a text field next to it, to
type in what I am searching for. I want to search the "Description" field on
the table (called) cameratype. I need to be able to type in only the first
few letters of the items I am looking for , ie, I need to type in Fuj and
get a report of all my records that have Fuj in the description field....
any ideas would be great. I have already created a querie form and need to
add the search feature to it....
Thanks
Kevin R
 
Base your form on a query. Put the following expression in the criteria of the
Description field:
Like "*" & Forms!NameOfYourForm!NameOfTextBox & "*"

Add an unbound textbox to your form.

Put the following code in the Click event of the button:
Me.Requery

Note that you will in most cases get more than one record in your search.
 
Back
Top