473,426 Members | 1,433 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,426 software developers and data experts.

Program Excel to pull data from Access table and view it Summary worksheets _

Procman
I'm using Office 2003 and have done some programming in Access, but not in Excel. - I have an Access DB with a form to enter all receipts and invoices. I use Excel to view the data as a Monthly/Yearly Budget Summary based on categories of the Items entered in the Access form. I am pulling the data from the Items table in Access and want Excel to SUM each category and enter the values in the worksheets by month. So the user will only need to enter the receipts in the Access form, open Excel, select the month, then view/print the worksheets. I do not have any code in excel yet, as I don't even know where to start. Currently I use the toolbar button in Access to Analyze the Items table with Excel, sort by Category, then highlight the values to get the total and enter it in the appropriate worksheets. The worksheets are an instant snapshot of Current vs Projected amounts for the budget. I have about a dozen applications for this process, once I can finally understand it. Thank you for your assistance.
Oct 14 '13 #1
2 1822
zmbd
5,501 Expert Mod 4TB
You should be able to do this in either an Aggregate query and report or using a crosstab query; thus, no need for Excel... Unless you need the statistics, other financial tools, what-if analysis, or (like me) you have several people that are expecting an Excel workbook for the results and just will not change their ways. Sum data by using a query (ACC2007) (I know this references Access 2007; however, on a fairly quick review, I didn't see anything in the article that wouldn't also be valid for ACC2003)

A few ways to get at the Access data:
You can link from Excel to Access:
[url=http://office.microsoft.com/en-us/access-help/import-export-and-link-data-between-access-and-excel-HP001095095.aspx]Import, export, and link data between Access and Excel[/ur] once you have the link established, then you can manipulate away.

Or you can take a look at the TransferSpreadsheet Method (Access 2003 VBA Language Reference) A few things to note with this method is that it requires the use of a "stored" or "Named" query... that is to say, that you cannot use a SQL/Record-set at runtime. However, there are ways around this limitation using a parameter based query that pulls the data in question, I don't remember if ACC2003 will allow that or not for this method, or by adding/modifying a query in the QRYDEFS-Collection.

Then there is "Office Automation" where we can use a runtime SQL and then open a workbook and move the information from the record set into the workbook; however, this can be very heavy-duty VBA coding!
Oct 14 '13 #2
I guess you answered both questions I posted (1 for Access and 1 for Excel). I've attached the DB PrtScr (in Word) and the Workbook so you can see exactly what I'm trying to do.
The purpose of these files is for budgeting and reporting for home and home business use. The DB is used for entering all receipts and invoices and the workbook is used for analysis and reporting. Income is entered into the workbook and the expenses in the DB. The FMB worksheet is the report and I will be working more with the data from there (i.e. charts, etc). I want this automated so that all the (non-tech) user will have to do is enter the receipts/invoices in the DB (Receipts Main Form) and Paychecks/Income in Excel (Wages tab), then be able to view the current data in the FMB and YMC-B worksheets. Each month will be a new FMB sheet and the YMC-B sheet is for the year. Each Group/Item on the FMB sheet corresponds to the FMBGroup and FMBLineItem fields in the Items table in the db.
The source of the data I want to bring into Excel is the Items table in the db. A link is likely the best way to connect them? I hope this gives you a better idea of what I'm trying to do.
Attached Files
File Type: doc 13-1014 - DB PrtScr - Bytes.doc (902.0 KB, 193 views)
File Type: xls 13-0928 - Monthly Budget - Bytes.xls (179.0 KB, 443 views)
Oct 14 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Mr. Smith | last post by:
Hello all, My code can successfully open, write to, format and save several worksheets in a workbook then save it by a given name, close and quit excel. My problem is that if I try and do it...
6
by: syvman | last post by:
Hi everyone... I am pulling my hair out trying to do this, and was wondering if someone could give me some assistance... I have an Excel spreadsheet containing several worksheets. I'd like to be...
1
by: dmkeith2 | last post by:
This is probably easy to do but I can't find it in the groups. How do I paste into an excel document without the MS Access headers? I just want to paste the data. Thanks
2
by: saddist | last post by:
Hello, I have and excel sheet with fields: Name | Surname | Dept. When I execute the following code, it imports 16 empty rows + filled ones DoCmd.TransferSpreadsheet acImport = 0,...
2
by: ALaurie10 | last post by:
I have an excel file in Accounting Format, my feild names go down the page and the data goes across. There are four values for each feild. After importing my excel file into a table, the feilds are...
6
by: grego9 | last post by:
I am trying to return a value from an access database by looking up a value in excel. This is the code I have copied from another source - but I cannot get it to work - I keep getting a run time...
3
by: nspader | last post by:
Hello All, This seems like it should be simple but I cannot figure it out. I am trying to set up a button click to import an excel file to a temp table then run an append query to add it to an...
6
by: provor | last post by:
Hello, I have the following code that I am using when a user presses a button to import an excel file into a table. The code is hard coded to point to the correct table. This works great for this...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.