Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Everyone,
I have a workbook that contains an ODBC link to a database and using MS-Query it fills a range in my workbook with some filtered data from my source database. My query is set up at the moment, more or less hard-coded, to get the last 7 days of data. Because of the hard-coding, I have to go in to the query manually and specify a new date parameter whenever the query needs to be updated. I'd like to be able to change the MS-Query data from Excel so that I can change the filtering and sorting without the need to manually modify the query every time. Is this possible? Regards Greg |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greg,
Check out "parameter_query" in Excel Help. NickHK "Greg Glynn" wrote in message oups.com... Hi Everyone, I have a workbook that contains an ODBC link to a database and using MS-Query it fills a range in my workbook with some filtered data from my source database. My query is set up at the moment, more or less hard-coded, to get the last 7 days of data. Because of the hard-coding, I have to go in to the query manually and specify a new date parameter whenever the query needs to be updated. I'd like to be able to change the MS-Query data from Excel so that I can change the filtering and sorting without the need to manually modify the query every time. Is this possible? Regards Greg |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
http://nickhodge.co.uk/gui/datamenu/...taexamples.htm
http://www.dicks-clicks.com/excel/Ex...htm#Parameters -- Regards, Tom Ogilvy "Greg Glynn" wrote: Hi Everyone, I have a workbook that contains an ODBC link to a database and using MS-Query it fills a range in my workbook with some filtered data from my source database. My query is set up at the moment, more or less hard-coded, to get the last 7 days of data. Because of the hard-coding, I have to go in to the query manually and specify a new date parameter whenever the query needs to be updated. I'd like to be able to change the MS-Query data from Excel so that I can change the filtering and sorting without the need to manually modify the query every time. Is this possible? Regards Greg |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It might be better to move away from MS Query and code in VBA with ADO.
It is quite simple and will give you much more control. Plenty of code samples around. RBS "Greg Glynn" wrote in message oups.com... Hi Everyone, I have a workbook that contains an ODBC link to a database and using MS-Query it fills a range in my workbook with some filtered data from my source database. My query is set up at the moment, more or less hard-coded, to get the last 7 days of data. Because of the hard-coding, I have to go in to the query manually and specify a new date parameter whenever the query needs to be updated. I'd like to be able to change the MS-Query data from Excel so that I can change the filtering and sorting without the need to manually modify the query every time. Is this possible? Regards Greg |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Gentlemen. Excellent advice. All working (and I'm
investigating ADO). Regards Greg |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am faced with a very similar challenge. I have set up a parameter query and I have cells that store minimum vendor number, maximum vendor number, minimum department number and maximum department number. The query works great for those particular variables. I have not been able to figure out how to format cells for the buyer number field where the selction criter is In('02,'05'). I keep getting the message "a buffer passed to a system call is too small to hold return data". Any suggestions would be appreciated. Sincerely Jim Palmer -- Jim Palmer ------------------------------------------------------------------------ Jim Palmer's Profile: http://www.excelforum.com/member.php...fo&userid=5210 View this thread: http://www.excelforum.com/showthread...hreadid=544546 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 - Changing properties for Chart on Worksheet | Excel Discussion (Misc queries) | |||
changing the properties of an excel file | Excel Programming | |||
Programatically Changing Hover Labels | Excel Programming | |||
How to stop Excel from changing the cell properties? | Excel Discussion (Misc queries) | |||
MS Query, command View-Query Properties | Excel Discussion (Misc queries) |