View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
gab1972 gab1972 is offline
external usenet poster
 
Posts: 57
Default Search a database with multiple strings?

I have an MS Access database that I am pulling and sending information
from/to. I have one table (permit_info) and about 20 different
fields.

I have a userform in Excel that the user can type in a permit number
and it will find the recordset matching that number (my table has a
field with permit numbers in it). What I want to do is allow the user
to search by multiple fields. Say, the person doesn't know the permit
number and wants to search by county and/or applicant name. Can I do
a keyword search box on my user form and have Excel return possible
hits?

I'm guessing some kind of loop that will search by say 3 different
fields, go into Access and pull the recordsets matching those 3
fields, store them temporarily in Excel on a hidden sheet, and then
display them in a combobox???

I'm using Office2k3.
Database path/name: P:\Permit Tracking System Project\Tracking System
Project\Permit.Tracker_v0.01109b.mdb
Table name: permit_info

I'm using ADO to communicate with Access.

Can anyone get me started? Thanks in advance.