Advertisement

05.05.2008 at 11:50AM PDT, ID: 23377309
[x]
Attachment Details

How do I generate a day wise report from Access using VBA, ADO query? (See attached files)

Asked by orazen11 in Access Reports, Microsoft Excel Spreadsheet Software, VB Script

Tags: SQL, Excel VBA

Hi all,
I have an access table which stores the daywise prices of some 1000 shares such that any row in the table gives the price of the share in that row as on a particular date (Please see the attached file name "INPUT---MS-Access-2003-Database-.xls"). I am presently trying to generate a day-wise report of the prices of these shares in the format given in the attached file (Please see "OUTPUT---MS-Excel-2003-Output.xls"). I donot  want to use Excel pivot table for this. I am, however, fine with a query/procedure in Access which makes use of pivot table or Crosstabs (not sure whether crosstabs work in Access. I have never used crosstabs).
Here's what I was thinking of doing:

1) Establish a connection to Access from Excel
2) Run a VBA code from Access or Excel
3) Push the result to Excel
                           OR
1) Establish a connection to Access from Excel
2) Pull the entire Access table contents in Excel.
3) Run a VBA code in Excel to bring it in desired format (not pivot table)

I already have a little idea about the second approach. But my data is going to be huge and the second method takes time. So please suggest ways of doing the above with the first method or any method which is efficient.

ThanksStart Free Trial
Attachments:
 
This file is gives the format in which the data is stored in the "FNO" table in MS Access 2003
 
 
This file gives the desired format of the output required in Excel
 
[+][-]05.05.2008 at 04:52PM PDT, ID: 21503888

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.06.2008 at 04:52AM PDT, ID: 21506424

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Reports, Microsoft Excel Spreadsheet Software, VB Script
Tags: SQL, Excel VBA
Sign Up Now!
Solution Provided By: rorya
Participating Experts: 2
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628