Freetext search

chrisjames25

Registered User.
Local time
Today, 12:27
Joined
Dec 1, 2014
Messages
404
HI

I have the attached main form. When i choose from any of the category, genus or variety comboboxes the below table filters accordingy using the attached query image.

What i am trying to achieve is if i enter text in the search text box the three combobox clears (i can do this) but i have no clue how to change the query to filter and search each column for words matching my text search.

i.e. if i have the following info in the table :

First Name Last Name
Chris Jones
Peter Parker
Bruce Wayne
Jones Chris

and i type in my search text "jones" it would filter data down to just the 2 entries
 
no image attached, but guessing your filter needs to be something like

"[First Name]='" & me.searchbox & "' OR [Last Name]='" & me.searchbox & "'"
 
Apologies, now attached
 

Attachments

  • Main Form.jpg
    Main Form.jpg
    99.2 KB · Views: 125
  • Query.JPG
    Query.JPG
    89.3 KB · Views: 78
..and you can use a button's click event to search or the textbox Change event (using Text property of the textbox as critera)
 
your query is showing ANDs (all the criteria on the same row). They need to be OR's (each criteria on a different row)

Depends how efficient you need to be, but your easiest option is to remove the criteria from your query and build a filter along the lines I suggested - and triggered as arnel suggested

if necessary, set the filter to false in the form open event to avoild bringing anything through until the user has made their selection
 

Users who are viewing this thread

Back
Top Bottom