MS Query report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to use Excel & MS Query to return data from a database. I have
built a query that works, based upon a static 'contains' criteria - a like
'%<criteria>%' statement, but what I would like to do is to take the
'%<criteria>%' from a cell within the excel worksheet. I can return data
using the equals command, but cannot get the contains statement to work

Can this be done without the use of macros or VB??

Please Help!!!!!
 
Try this: for the criteria in MSQuery use the expression:
Like '%'&[CRITERIA]&'%'
Then back in Excel set the parameter to link to the cell - this seems to
work for me, at least with the data set I am using.
 
You will find tips about manipulating MsQuery and the use criteria
here:http://oraclevsmicrosoft.blogspot.com/2004/10/from-datawarehouse-to-chart-part-1.html
and
there:http://oraclevsmicrosoft.blogspot.com/2004/11/from-datawarehouse-to-chart-part-2.html.

hope this help.

oracleVsMicrosoft

K said:
Try this: for the criteria in MSQuery use the expression:
Like '%'&[CRITERIA]&'%'
Then back in Excel set the parameter to link to the cell - this seems to
work for me, at least with the data set I am using.

AndyP said:
I would like to use Excel & MS Query to return data from a database. I have
built a query that works, based upon a static 'contains' criteria - a like
'%<criteria>%' statement, but what I would like to do is to take the
'%<criteria>%' from a cell within the excel worksheet. I can return data
using the equals command, but cannot get the contains statement to work

Can this be done without the use of macros or VB??

Please Help!!!!!
 
Back
Top