ODBC Link changing selection criteria

C

Chris F

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
 
C

Chris F

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.
 

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