advanced searching through forms

antonyx

Arsenal Supporter
Local time
Today, 17:50
Joined
Jan 7, 2005
Messages
556
ok, i have just had a lengthly conversation with my user and i need an advanced search system.

what i would need is a search function, that does not only list the full field details from each record in the combos..

here is what i mean.. i have a quotation form with different locations and prices in a list box. i have a text box at the top of the form with an onchange event that alters the results in the list box.

so if the user types 'a'.. only the axxxxx records are displayed.. if they type 'ab' only the 'abxxxx records are shown.. and so on.

because my customer may not remember the exact address of their pickup or destination, i cant use this system, because i wont know the first letter of the details previously entered..

eg.. a user may have been picked up from '5 house street, new hampshire crescent.

if all the customer remembers is 'hampshire crescent.. then the above system will not reveal my record..

therefore i would need a search box at the top that allows me to search for any word (or identical consecutive characters) within a chosen field.

can this advanced string search be done in access?
 
Look at the LIKE operator. It's worth looking in the Sample Databases section of these forums for good exaples of complex searching.
 
ok thanks, i found this code that can be placed in the criteria of a query

Code:
Like '*' & [Enter text to search :] & '*'

this acheives the results i want but i would need this to be incorporated into a form.. could i for example make a serch box on my form (txtSearch) and then have a search button that 'onclick' runs this procedure from the textbox search and populates the forms other combo boxes 'field choices' accordingly depending on the record/s found in the search????
 

Users who are viewing this thread

Back
Top Bottom