Parameter queries in Excel 2007

S

Sam in Chicago

I'm trying to create new parameter queries in Excel 2007 and getting "No
value given for one or more required parameters" errors. I've done this a
million times in office xp, but not 07.

I'm creating a query table with the following non parameterized SQL to start:
SELECT * FROM BusIntraday WHERE (BusinessDate = '1/22/2008')

I get my data in a new fancy Excel 2007 data table.

I'm then programatically changing the SQL via the following VBA:
Dim qt As QueryTable
Set qt = Me.Range("Source_FXIntraday").ListObject.QueryTable
qt.CommandText = "SELECT * FROM BusIntraday WHERE (BusinessDate = ?)"

<note, i am not refreshing>

After that, i am able to right-click on the fancy data table, select
"Table", select "Parameters", and designate the cell i want to pull my
business date from.

When i try to refresh after that, i get the error message.

I can do this in officexp/2003.

I can do this with MSQuery, but in 2007 the resulting data table created
using MSQuery lacks the property whereby it expands and contracts derivative
formulas to the right of the data as the results of the query expand and
contract (i get "holes" in the column where formulas aren't extended when the
query table data extends).

I can't find anything on the internet that is helping me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top