Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Advanced Database Query using VB Script

I am trying to do something a little bit more advanced than excel can
handle with the Import External Data - New Database Query. With that
query, I can do something like this.

Author Title Units
--------------------------------------------------------
Smith, Bob Excel for Dummies 2
Smith, Bob Word for Dummies 8
Smith, Sarah Gone with the BSOD 18
Smith, Sarah Email for beginners 7



What I am trying to put together is something a little more flexible
such as the following:

Author Title Units
--------------------------------------------------------
Smith, Bob
: Excel for Dummies 2
: Word for Dummies 8
::Books by Bob Smith: 2
::Units in stock: 10
--------------------------------------------------------
Smith, Sarah
: Gone with the BSOD 18
: Email for beginners 7
::Books by Sarah Smith: 2
::Units in Stock: 25
--------------------------------------------------------


Im sure that to do this, I can use VB Script. Can anyone give some
advice on how to get started. With PHP, I would just do it with 2
loops. One select statement would call the Authors table and get
everything with Smith. Then it would loop through the smiths and get
all of the books for each.

Thanks for any help you can give! I am not adverse to buying a book if
that is your recommendation

P.S. I also need to set the formatting of each cell / row / column for
totals.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Advanced Database Query using VB Script

You can do most of what you want with a PivotTable Report under the data
menu.

--
Regards,
Tom Ogilvy

"sudonim" wrote in message
ups.com...
I am trying to do something a little bit more advanced than excel can
handle with the Import External Data - New Database Query. With that
query, I can do something like this.

Author Title Units
--------------------------------------------------------
Smith, Bob Excel for Dummies 2
Smith, Bob Word for Dummies 8
Smith, Sarah Gone with the BSOD 18
Smith, Sarah Email for beginners 7



What I am trying to put together is something a little more flexible
such as the following:

Author Title Units
--------------------------------------------------------
Smith, Bob
: Excel for Dummies 2
: Word for Dummies 8
::Books by Bob Smith: 2
::Units in stock: 10
--------------------------------------------------------
Smith, Sarah
: Gone with the BSOD 18
: Email for beginners 7
::Books by Sarah Smith: 2
::Units in Stock: 25
--------------------------------------------------------


Im sure that to do this, I can use VB Script. Can anyone give some
advice on how to get started. With PHP, I would just do it with 2
loops. One select statement would call the Authors table and get
everything with Smith. Then it would loop through the smiths and get
all of the books for each.

Thanks for any help you can give! I am not adverse to buying a book if
that is your recommendation

P.S. I also need to set the formatting of each cell / row / column for
totals.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Advanced Database Query using VB Script

Tom,

Thanks for the response. PivotTables do allow me to do something like
this. However, their formatting is a little bit more limited. I really
need to have more control over formatting as we are creating reports to
the spec of our customers. For example, one limitation I found with
pivottables is they dont hold formatting well that you set yourself.
When you refresh the data, the formatting disappears. I am much more
comfortable with hardcoding the formatting.

Any help there?

Colin


Tom Ogilvy wrote:
You can do most of what you want with a PivotTable Report under the

data
menu.

--
Regards,
Tom Ogilvy

"sudonim" wrote in message
ups.com...
I am trying to do something a little bit more advanced than excel

can
handle with the Import External Data - New Database Query. With

that
query, I can do something like this.

Author Title Units
--------------------------------------------------------
Smith, Bob Excel for Dummies 2
Smith, Bob Word for Dummies 8
Smith, Sarah Gone with the BSOD 18
Smith, Sarah Email for beginners 7



What I am trying to put together is something a little more

flexible
such as the following:

Author Title Units
--------------------------------------------------------
Smith, Bob
: Excel for Dummies 2
: Word for Dummies 8
::Books by Bob Smith: 2
::Units in stock: 10
--------------------------------------------------------
Smith, Sarah
: Gone with the BSOD 18
: Email for beginners 7
::Books by Sarah Smith: 2
::Units in Stock: 25
--------------------------------------------------------


Im sure that to do this, I can use VB Script. Can anyone give some
advice on how to get started. With PHP, I would just do it with 2
loops. One select statement would call the Authors table and get
everything with Smith. Then it would loop through the smiths and

get
all of the books for each.

Thanks for any help you can give! I am not adverse to buying a book

if
that is your recommendation

P.S. I also need to set the formatting of each cell / row / column

for
totals.


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
Update Excel Database via Access Main Database with a script Finnbar New Users to Excel 2 November 3rd 08 07:24 PM
database query not showing foxpro database How I import data mangat New Users to Excel 1 June 24th 07 03:31 PM
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? jocke Excel Discussion (Misc queries) 1 November 29th 05 01:44 PM
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? jocke Excel Discussion (Misc queries) 0 November 28th 05 06:37 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


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

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"