Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I am using Excel 2007 I have a pivot table that gets refresh everyday. The data from the pivot table is based on a sql statement, which the data is connected to a AS/400 table. Here is my problem every morning I go in the connection properties and change the SQLstatement (date) in the command text. I don't want my user to do this. What other option can I do? I was thinking change the date in a cell (A1) and somehow the SQL statement picks up the new date or maybe some sort of parameter, but I am clueless in how to do this. Any tips or website to visit I will appreciate. Thank you in advance. Regards, |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Have a look for Query Paramaters (or Parameter Queries) in the help or on Google. I have basically the same problem myself, and this is the way I hope to solve it. If it works it shouldn't be necessary to write any VBA code ;-) Sadly I haven't actually had time to work on it yet, but i've had a look at the examples and it looks good. basically you should be able to define your SQL query with the date as a parameter that is pulled from a cell in the sheet. Good luck ;-) "CAM" wrote: Hello, I am using Excel 2007 I have a pivot table that gets refresh everyday. The data from the pivot table is based on a sql statement, which the data is connected to a AS/400 table. Here is my problem every morning I go in the connection properties and change the SQLstatement (date) in the command text. I don't want my user to do this. What other option can I do? I was thinking change the date in a cell (A1) and somehow the SQL statement picks up the new date or maybe some sort of parameter, but I am clueless in how to do this. Any tips or website to visit I will appreciate. Thank you in advance. Regards, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change cell color for valid if statement | Excel Discussion (Misc queries) | |||
if statement, change cell only if true | Excel Worksheet Functions | |||
Excel 2003 make 1 date cell automatically change another date cell | Excel Worksheet Functions | |||
date in Cell to change colors if the date is beyond today's date | Excel Discussion (Misc queries) | |||
Change Cell Color Based on IF Statement | Excel Worksheet Functions |