Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The last code I posted had the following:
"Initial Catalog='Northwind';Integrated Security='SSPI';" Inital Catalog and Integrated Security are two columns in the database. In your database you have two columns "Permit Number" and "Engineer". Your want SQL = "Permit Number = '1234';Engineer = 'Lawson & Lawson Engineers, LLC'" Now if you want to make the line variable do this PNum = 1234 Eng = Lawson & Lawson Engineers, LLC Then SQL = "Permit Number = '" & PNum & "';Engineer = '" & Eng &"'" The above line has the following in order " - a single quote '" - a single quote followed by a double quote "' - a double quote followed by a single quote '" - a single quote followed by a double quote "'" - a double quote, single quote, and then another double quote I hope this gets you a little futher along "gab1972" wrote: I really hate to be a pain... I understand that the last bit of code gives me a connection to access from Excel using ADO....what part is allowing me to search? Right now, I'm only giving the option to search by permit number. The user selects a permit number from a combobox and based on that value, Excel is going to Access, finding the corresponding recordset and bringing it back to Excel. What I want is to expand my search string. So instead of limiting to a permit number...say the permit was applied for in Sumter County (one of the counties in my state) and the engineer was Lawson & Lawson Engineers, LLC. I want my user to be able to type in "Sumter, Lawson" in a box and have Excel find all recordsets in my data table matching those criteria. There might be 4 recordsets matching Sumter County and Lawson & Lawson Engineers, LLC, but each with different permit numbers. This gives the user a bit more flexibility in narrowing down their search if they don't know the specific permit number. Again, I *REALLY* appreciate all your help...I hope I'm not frustrating you with all the questions. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
search for multiple strings | Excel Discussion (Misc queries) | |||
Search for multiple strings in a list (w/in 1 cell) w/ Advanced fi | Excel Discussion (Misc queries) | |||
Search multiple strings in one text file | Excel Programming | |||
Search multiple strings in each cell | Excel Programming | |||
Search multiple strings Difficult to figure out | Excel Programming |