View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
DM Unseen DM Unseen is offline
external usenet poster
 
Posts: 233
Default ms query - from statement

Hm, MSQUERY is defnitly very picky. You could either try to recreate
the general query with MSQuery, add a filter, and change the filter
value with "[Parameter 1]" (no quotes). The problem is that MSQuery
prevents you from doing serious SQL queries and only works when you
follow it's own format which your query probably does not, thus hand
coded SQL can be rejected for parameters. It is not very user friendly
(what am I saying? It is an SQL editor nightmare!).

For the advanced option I would suggest you go to

http://homepages.paradise.net.nz/~ro...eryeditor.html

This tool works wonders on unwilling SQL reports.
First be shure you can edit the SQL with this tool and you can see the
SQL (and edit the query). For good database reports this tool is
indispensible (I use a similar tool that I developed myself). First run
it without a parameter( just hardcode the value). After that replace
the value with a questionmark and refresh again. A parameter prompt
should show up, and you can let that reference a cell. Once you know
SQL, and use this editor you'll find that creating Excel database
reports *can* be fun.

Hope this quick primer on Excel SQL reports helps

DM Unseen