Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RE: MS Query - change parameter with Excel cell

1,131 views
Skip to first unread message

TedGrier

unread,
Jul 22, 2004, 7:26:02 AM7/22/04
to
I have the exact same problem, and have been posting the question daily.
PLEASE share the answer with me if you find it. tgr...@9gcommunications.com
See my thread this morning....

Ted Grier


"emea training 2 >" wrote:

> I have an Excel file which links to our database via ODBC and Microsoft
> Query.
>
> The Excel file contains a graph of sales figures which I have set to
> refresh every 5 mins without user intervention. It is then permanently
> displayed on a projector.
>
> However, every day we have to edit the Query to change the date to be
> >= the current date.
>
> Can I link the Query to a cell in Excel which contains today's date as
> this would be much simpler?
>
> Thanks.
>
>
> ---
> Message posted from http://www.ExcelForum.com/
>
>

Debra Dalgleish

unread,
Jul 22, 2004, 6:23:22 PM7/22/04
to
In an empty cell on the worksheet, type: =TODAY()
Choose Data>Import External Data>Edit Query
Remove the date in the query, and enter a parameter. For example:
[What Date?]
Choose File>Return data to Microsoft Excel
When prompted, type the current date

Select a cell in the query results
Click the Query Parameters button
Choose 'Get the value from the following cell'
Click in the reference box, then select the cell that contains
the TODAY formula.
Check the 'Refresh automatically' box
Click OK

emea training 2 < wrote:
> I have an Excel file which links to our database via ODBC and Microsoft
> Query.
>
> The Excel file contains a graph of sales figures which I have set to
> refresh every 5 mins without user intervention. It is then permanently
> displayed on a projector.
>
> However, every day we have to edit the Query to change the date to be
>
>>= the current date.
>
>
> Can I link the Query to a cell in Excel which contains today's date as
> this would be much simpler?
>
> Thanks.
>
>
> ---
> Message posted from http://www.ExcelForum.com/
>


--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

Debra Dalgleish

unread,
Jul 23, 2004, 12:56:36 PM7/23/04
to
In the query, you could change the criteria to Date()

emea training 2 < wrote:
> Many thanks - this works for my queries that return data to Excel.
>
> I also have a query that populates a pivot table - so that I can get it
> to refresh every 2 mins - but this does not alllow this fix. It come
> up with the message "Parameters are not allowed for this query".
>
> Is there any way around this?

0 new messages