Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Search Query

Status
Not open for further replies.

ianbar

Technical User
Jan 10, 2003
69
0
0
GB
Hi,

I have an unbound search text field on my form and beneth that a dropdown box that the user can select the field they wish to search. I have the queries in place that use the details in the textbox to produce results, what I need is help with the code that says if the drop down box equals customer name then it uses the 'customer name' query.

At the end of the day I want users to be able to type in what they are searching for, select the field (from the drop down box)that this search applies to and hit the go button to make it happen.

Any help would be grately appreciated.
 
Hi ianbar,

Could U Please Clear Ur Request More, "Drop Down Box" ?????
Can U Give The Exact Name For Ur Controls Either List Box Or Combo Box or.....

Good Luck
Saam
 
The drop down box (called 'searchtype') has the field names in : "Customer Name";"Company Name";"Product Name";"Serial Number".

I have a text box above that called 'searchbox'. This uis how I would like to see it working:

A user enters 'bloggs inc' in the field 'search box' and selects Company Name from 'searchtype'.

They hit the 'go' button and it runs the company name query, I have created that uses the information in 'searchbox' for the criteria.

Hope that makes a bit more sense.

 
Hi ianbar,

I understood ur problem, i have a few question:
Do u use a sql code query or normal query?
and once the citeria is true, what is the next step.
what u r going to do?

if u let me know that may i found a easy way in code to solve ur problem, as i understood ur project is runing like this

SearchBox ------------ SearchType-------- Run Query.


Good Luck
Saam001@yahoo.com
 
I will use the query in a macro as a filter on the form. That was a good question I need to run a mcaro and not the query, based on the drop down box!

You got the format in one!

Thanks for your help and patience.



 
Hi Ianbar,

I Need table fields name so i can build code 4 u to run it when u click on Go.
And it's better to zip ur db and send it to me.

Saam001@yahoo.com
Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top