Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default MSQuery Parameters and Group/Summation URGENT!

Using MSQuery for Excel, I have created a query linked to an outside data
source that uses a parameter that is linked (auto-prompted) to a cell on my
worksheet. That works very well. Now I want to group the rows (within the
query) and sum the values. This doesn't work!

However, it does work for me as long as I supply the parameter within the
query grid. However, if I want it to prompt me for the parameter, it gives me
the error.. "Invalid column name 'mydata'. Statement(s) could not be
prepared."

Why is it doing this? And.. How can I get around it???
--
Thanks! cs
  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default MSQuery Parameters and Group/Summation URGENT!

I find it to my advantage to record a macro while writing a MSQuery. Then
just run the macro whenever I want the data. This gives me easy access to
Edit the Query at will, as well as to provide additional processing to the
data once it is retrieved.

Vaya con Dios,
Chuck, CABGx3



"Cydney" wrote:

Using MSQuery for Excel, I have created a query linked to an outside data
source that uses a parameter that is linked (auto-prompted) to a cell on my
worksheet. That works very well. Now I want to group the rows (within the
query) and sum the values. This doesn't work!

However, it does work for me as long as I supply the parameter within the
query grid. However, if I want it to prompt me for the parameter, it gives me
the error.. "Invalid column name 'mydata'. Statement(s) could not be
prepared."

Why is it doing this? And.. How can I get around it???
--
Thanks! cs

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default MSQuery Parameters and Group/Summation URGENT!

I like that solution! I'm testing it out now. Could you send me an SQL
example using a parameter that exists in the workbook --say cell A1--? I'm
going to be turning the workbook over to another user who's not savvy at all
in MSQuery and I really don't want to turn them loose in there. So, if this
macro works, it would be great!

Thanks! cs


"CLR" wrote:

I find it to my advantage to record a macro while writing a MSQuery. Then
just run the macro whenever I want the data. This gives me easy access to
Edit the Query at will, as well as to provide additional processing to the
data once it is retrieved.

Vaya con Dios,
Chuck, CABGx3



"Cydney" wrote:

Using MSQuery for Excel, I have created a query linked to an outside data
source that uses a parameter that is linked (auto-prompted) to a cell on my
worksheet. That works very well. Now I want to group the rows (within the
query) and sum the values. This doesn't work!

However, it does work for me as long as I supply the parameter within the
query grid. However, if I want it to prompt me for the parameter, it gives me
the error.. "Invalid column name 'mydata'. Statement(s) could not be
prepared."

Why is it doing this? And.. How can I get around it???
--
Thanks! cs

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default MSQuery Parameters and Group/Summation URGENT!

Also.. I'm using an ODBC connection. Please include that type in your SQL.

Also.. In my test, I see that it hard-codes in my personal PC ID. Which
means, I guess, that I couldn't run it successfully on someone else's PC. Can
I get around that?
--
Thanks cs


"Cydney" wrote:

I like that solution! I'm testing it out now. Could you send me an SQL
example using a parameter that exists in the workbook --say cell A1--? I'm
going to be turning the workbook over to another user who's not savvy at all
in MSQuery and I really don't want to turn them loose in there. So, if this
macro works, it would be great!

Thanks! cs


"CLR" wrote:

I find it to my advantage to record a macro while writing a MSQuery. Then
just run the macro whenever I want the data. This gives me easy access to
Edit the Query at will, as well as to provide additional processing to the
data once it is retrieved.

Vaya con Dios,
Chuck, CABGx3



"Cydney" wrote:

Using MSQuery for Excel, I have created a query linked to an outside data
source that uses a parameter that is linked (auto-prompted) to a cell on my
worksheet. That works very well. Now I want to group the rows (within the
query) and sum the values. This doesn't work!

However, it does work for me as long as I supply the parameter within the
query grid. However, if I want it to prompt me for the parameter, it gives me
the error.. "Invalid column name 'mydata'. Statement(s) could not be
prepared."

Why is it doing this? And.. How can I get around it???
--
Thanks! cs

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
msquery troestj Excel Discussion (Misc queries) 1 September 25th 06 02:31 PM
MSQuery Lac Excel Worksheet Functions 2 June 14th 06 08:49 AM
MsQuery Documentation [email protected] Excel Discussion (Misc queries) 0 March 28th 06 04:55 PM
Combo box from MSQuery Dean Excel Worksheet Functions 0 January 11th 06 12:12 PM
urgent ......problems on group pamela Excel Worksheet Functions 5 September 2nd 05 11:14 AM


All times are GMT +1. The time now is 12:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"