473,396 Members | 1,891 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,396 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 1820
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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
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,...

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.