Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default ODBC Link changing selection criteria

Hi
I have an ODBC link to some accounts data. I want to list the transactions
for a date range. I have DateFrom and DateTo named ranges. I have a macro
to refresh the data but this gets all of the data and I want to restrict the
data returned to the date range, which changes on a regular basis.

The refresh data line in the macro is below. Can I change this to pick up
the date from and date to criteria from the named ranges at the time of
refreshing the data?

Selection.QueryTable.Refresh BackgroundQuery:=False

Thanks

Chris


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default ODBC Link changing selection criteria

Hi
I have done some investigations and found that you can link query parameters
to a particular cell on the spreadsheet, which partially helps but the query
parameter that I want to link is a date and this does not seem to be able to
be linked to a cell

Can anyone help?

Chris.
"Chris F" wrote in message
...
Hi
I have an ODBC link to some accounts data. I want to list the

transactions
for a date range. I have DateFrom and DateTo named ranges. I have a

macro
to refresh the data but this gets all of the data and I want to restrict

the
data returned to the date range, which changes on a regular basis.

The refresh data line in the macro is below. Can I change this to pick up
the date from and date to criteria from the named ranges at the time of
refreshing the data?

Selection.QueryTable.Refresh BackgroundQuery:=False

Thanks

Chris




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing ODBC server (MySQL) Groj Excel Worksheet Functions 0 November 23rd 07 05:09 AM
Changing ODBC link in a query Keith Excel Discussion (Misc queries) 0 June 13th 07 02:27 PM
Changing ODBC Keith Excel Discussion (Misc queries) 2 February 6th 07 02:26 PM
paste special keep odbc link phtrochon Excel Discussion (Misc queries) 0 July 4th 05 02:02 PM
ODBC Link to db with custom modules Adam Excel Discussion (Misc queries) 0 December 29th 04 01:05 PM


All times are GMT +1. The time now is 02:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"