Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro for Parameter Query


I was able to make Excel pop-up a parameter dialogue box by creating
macro and changing the "SELECT ... " statement by adding the "WHER
field = ?" clause. However, it does not give a descriptive prompt
something like "Enter the branch code". In MS Query, it work
something like this: "SELECT ... WHERE branch = [Enter the branc
code]

--
bcha
-----------------------------------------------------------------------
bchan's Profile: http://www.excelforum.com/member.php...nfo&userid=827
View this thread: http://www.excelforum.com/showthread.php?threadid=27008

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default Macro for Parameter Query

bchan

Parameters for PivotCache queries are not supported. You can trick it by
changing the SQL and putting in the ?, but there's no access to a Parameter
object so you can't change the prompt string. You can either roll your own
as amo suggested or create the QueryTable and PivotTable separately. The QT
can have a customize parameter and you can base the PT on that range.
Refreshing the PT doesn't automatically refresh the QT, which stinks.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"bchan" wrote in message
...

I was able to make Excel pop-up a parameter dialogue box by creating a
macro and changing the "SELECT ... " statement by adding the "WHERE
field = ?" clause. However, it does not give a descriptive prompt,
something like "Enter the branch code". In MS Query, it works
something like this: "SELECT ... WHERE branch = [Enter the branch
code]"


--
bchan
------------------------------------------------------------------------
bchan's Profile:

http://www.excelforum.com/member.php...fo&userid=8274
View this thread: http://www.excelforum.com/showthread...hreadid=270081



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
Convert hard coded query criteria to Parameter Query Melanie[_2_] Excel Discussion (Misc queries) 0 July 15th 08 09:59 PM
How to choose if I use a parameter or not in a parameter query Arnaud Excel Discussion (Misc queries) 0 March 8th 07 01:19 PM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Excel Discussion (Misc queries) 1 December 13th 04 07:54 PM
Macro for Parameter Query bchan Excel Programming 1 October 18th 04 11:31 AM
Parameter Query executed from a Macro David Excel Programming 4 April 19th 04 11:37 PM


All times are GMT +1. The time now is 11:44 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"