Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refresh Data Import Q
I have a piece of code that uses a variable to pull info from a MS Access
database (finally through the help of this newsgroup to get it to work), all works well, except that when I change the variable and then just 'Refresh' the data it returns is using the previous variable that I have entered. What I have to do is delete the old query and run a new one. I thought it would just make sense to just 'refresh' using the new variable as I don't want my file to balloon in size, or am I doing something wrong? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refresh Data Import Q
Hi John,
I have a piece of code that uses a variable to pull info from a MS Access database (finally through the help of this newsgroup to get it to work), all works well, except that when I change the variable and then just 'Refresh' the data it returns is using the previous variable that I have entered. What I have to do is delete the old query and run a new one. I thought it would just make sense to just 'refresh' using the new variable as I don't want my file to balloon in size, or am I doing something wrong? How have you declared the variable? The only way it will happen automatically is if you've used a QueryTable with a parameter linked to a cell - it'll use the value in the cell with each refresh. If you're building the query in code, there's no link between the QueryTable and a variable. For details about using parameters in Query tables, see : http://www.dicks-blog.com/archives/2...l-external-dat a-queries/ Regards Stephen Bullen Microsoft MVP - Excel www.oaltd.co.uk |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refresh Data Import Q
Thanks for your reply Stephen, that's a great site, the examples really help
a novice. I have only one problem when it states 'click on parameters' mine is greyed out - I can't take the option, why is that? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refresh Data Import Q
Hi John,
Thanks for your reply Stephen, that's a great site, the examples really help a novice. I have only one problem when it states 'click on parameters' mine is greyed out - I can't take the option, why is that? That will be greyed out if you don't have any parameters in your query. If you go through the steps Nick suggests, you'll see how it all works, then (hopefully!) be able to adapt it to your needs. Regards Stephen Bullen Microsoft MVP - Excel www.oaltd.co.uk |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refresh Data Import Q
Stephen, kinda worked out how to do it, I'm assuming that the Query Wizard
won't work setting parameters. Problem is that after entering the date parameter and after trying to put in a second parameter of product numbers (presumably I can do that) I receive an Invalid Datetime Format Null error appearing "Stephen Bullen" wrote in message ... Hi John, Thanks for your reply Stephen, that's a great site, the examples really help a novice. I have only one problem when it states 'click on parameters' mine is greyed out - I can't take the option, why is that? That will be greyed out if you don't have any parameters in your query. If you go through the steps Nick suggests, you'll see how it all works, then (hopefully!) be able to adapt it to your needs. Regards Stephen Bullen Microsoft MVP - Excel www.oaltd.co.uk |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refresh Data Import Q
Stephen, forget half of my last post - got it working. One final question
which you maybe able to steer me on. I want another parameter which would select a range of product numbers, I've tried the "IN [Enter a Range]". How can I add an additional parameter? "Stephen Bullen" wrote in message ... Hi John, Thanks for your reply Stephen, that's a great site, the examples really help a novice. I have only one problem when it states 'click on parameters' mine is greyed out - I can't take the option, why is that? That will be greyed out if you don't have any parameters in your query. If you go through the steps Nick suggests, you'll see how it all works, then (hopefully!) be able to adapt it to your needs. Regards Stephen Bullen Microsoft MVP - Excel www.oaltd.co.uk |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refresh Data Import Q
Hi John,
I want another parameter which would select a range of product numbers, I've tried the "IN [Enter a Range]". How can I add an additional parameter? I'm not sure you can do that with linked cell parameters, I'm afraid Regards Stephen Bullen Microsoft MVP - Excel www.oaltd.co.uk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Import Data refresh problem | Excel Discussion (Misc queries) | |||
Data import from different excel files & automatic refresh | Excel Discussion (Misc queries) | |||
Import & Refresh- Changing Formulas | Excel Worksheet Functions | |||
Error on Refresh Data Import from Access | Excel Discussion (Misc queries) | |||
How do i refresh external data import in excel in seconds | New Users to Excel |