I have a form based on a query. How do I go about setting up a "Free Text" search function for one or more fields on the form. I would require to view all results of the search. I would appreciate any assistance.
kevsim
Thank you for the info, much appreciated, however, I can do the query from a query within the query. My problem is, how can I do it from a Form. What type of control do I use to ask the query, how do I ask the query and how do I have the display simular to a Web Query with multiple choices of selection.
Is it done with SEQ or VD?
I would appreciate how the structure and query should be formed.
kevsim
I am not sure how much detail you need since I do not know your level of expertise.
Say your form is based on a query "SELECT * FROM tblYourTable", and you a text box on your form to accept a search value, then in code you can build an SQL string (say "SELECT * FROM tblYourTable WHERE MyCol Like '*" & txtSearch & "*';" , then set the recordsourec of the form to teh sql string Me.Recordsource = strSQL, and requery the form Me.Requery, will populate your form with only those record(s) matching the WHERE clause.
Does that put you on track?
Regards
Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
kenneth.reaySPAMNOT@talk21.com
remove SPAMNOT to use
KenReay, thank you for the info, I am still a little lost on setting up the controls and code, I may not have explained fully, the full explanation is as follows -
I have a form based on a query. At present I search for records using 4 combo boxes, I select data in the first box, from my selection in this box only relevant data appears in the second combo box, from the selection in the second combo box only relevant data appears in the third combo box, when I make a selection from the fourth combo box, the complete record appears on my form filling all controls. How do I go about setting up a "Free Text" search function to achieve the same thing for one or more fields on the form and finish with the complete record? Do I need a combo box to select the field I require to search, if so, what code goes in the box for selecting the field? How does this choose only records relevant to the search? I would require to view all results of the search and what controls are necessary and the coding required. Would I need forward and backward buttons? When I am completed with the search how do I leave the query. I would appreciate any advise.
kevsim
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.