MSQuery not returning new data...

J

jhicker

I am using MSQuery to query our database and return values to Excel. I
will be returning this information monthly, so every month I want to
see the current month's data.

Some of my queries are able to be represented graphically in MSQuery,
so I set up a prompt for criteria to enter the month and year of the
information I want for my query. Works great...

Several of the queries are too complex to be represented graphically so
(I believe) I cannot set a criteria the way I did on the others. I
believe it is mainly the use of subselects that is causing this. No
big deal. I just set a variable up for the selects so I would only
have to change the month and year once in code when I update it every
month.

The problem I'm having is that when I change the month and year (set
@month = 4, set @year = 2006), and I push the "Return data" button, the
information is not refreshing in my spreadsheet. It does give me the
new value when I run it in MSQuery, but when I try to kick it back to
Excel, it is leaving the old value. I tried hitting the "Refresh"
button in Excel and it seems to be updating, but when the status shows
it as finished, it hasn't changed anything. Am I doing something wrong
or has anyone ran into this problem?

Thanks!
Jon
 

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