By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,594 Members | 3,459 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,594 IT Pros & Developers. It's quick & easy.

Seach Query and multiple records

P: 16
Hi all,

I've been working on a database and at them moment i am stuck....I was wondering if there was a way to build a search query that wouild allow me to search mulliple data records.

At the moment my query has two fields (product and location) but only allows me to search for one product record at a time
e.g if i wanted to search for a product: Polo then it brings up the location: London

How could i get the search to find mulitple products. e.g Product: Polo, M3, Q4 which would the produce Location: London, Essex, Reading (list)

At the moment it is very time consuming when i'm searching for 100 products because i have to do them one at a time.
Is there a way to do a multiple searchs using queries or other methods.

Many thanks
Dec 3 '07 #1
Share this Question
Share on Google+
2 Replies


puppydogbuddy
Expert 100+
P: 1,923
Hi all,

I've been working on a database and at them moment i am stuck....I was wondering if there was a way to build a search query that wouild allow me to search mulliple data records.

At the moment my query has two fields (product and location) but only allows me to search for one product record at a time
e.g if i wanted to search for a product: Polo then it brings up the location: London

How could i get the search to find mulitple products. e.g Product: Polo, M3, Q4 which would the produce Location: London, Essex, Reading (list)

At the moment it is very time consuming when i'm searching for 100 products because i have to do them one at a time.
Is there a way to do a multiple searchs using queries or other methods.

Many thanks
You can have a single textbox control for entering multiple products to be searched and use the Split function to parse the field into individual components as needed for database queries. As an example:

Code: ( text )
Dim strProductSearch
Dim strProduct

strProductSearch = "Product1, Product2, Product3"
strProduct = Split(strProductSearch, ",")
' - strProductSearch is now an array of individual products that can be handled separately
Dec 3 '07 #2

puppydogbuddy
Expert 100+
P: 1,923
Another alternative is to use a multi-select list box control on your search form:

http://www.databasedev.co.uk/list_box_searching.html
Dec 3 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.