Enter "Ford" into cell A5 and use:
="WHERE (T1.Expr Like '%"&A5&"%')"
Thank you very much.
I think I have some syntax work to do now. (syntax error). I have direction now..Thx...
ORIGINAL
.Sql = Array( _
"SELECT T1.Expr1, T1.list1, T1.list2, T1.list3, T1.`Sum Of NET1`" & Chr(13) & "" & Chr(10) & "FROM `c:\acc_samps\test2`.T1 T1" & Chr(13) & "" & Chr(10) & "WHERE (T1.Expr1 Like '%FORD%')" _
)
----------------------
REVISED
.Sql = Array( _
"SELECT T1.Expr1, T1.list1, T1.list2, T1.list3, T1.`Sum Of NET1`" & Chr(13) & "" & Chr(10) & "FROM `c:\acc_samps\test2`.T1 T1" & Chr(13) & "" & Chr(10) & "WHERE (T1.Expr1 Like '%"&A5&"%')" _
)
-----------------------
...that you know that you could do all this with
Excel's Data Get External Data menu command.
Have you used it?
Thanks Again.
I used that originally...started Macro-record
-ran 'get external data'
-selected Query1 from Accessfile
-selected like 'gm' ...
-returned data to excel
The external data Menu will allow not you to point to any item while it is running (Ie a cell on a worksheet)..you must type it in or select.
This is meant to actually refer to a reference
cell in excel that the sales rep will select from a drop down validate, and then it will pull in all his sales based on his selection of a group in excel. My retrieval worked, but not looking
at his/her selection.. I had to manually change the vb app code for each customer group. Since we
have reps all around the world, we wished to
use Excel and not msaccess since their laptops
all have excel.
Do you work with the MrExcel firm, or are you
a helpful viewer?
Thx again
> The external data Menu will allow not you to point to any item while it is running (Ie a cell on a worksheet)..you must type it in or select.
Yes, it will... read the Excel Help topic for
"parameter queries". And see the Data Get
External Data Parameters... command.