Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Pulling Access Information into Excel.
Written by Allen Wyatt (last updated January 3, 2020)
This tip applies to Excel 97, 2000, 2002, and 2003
Moss built an Access database of his customers, and he uses Excel for the invoicing. He wonders if there is a way to populate the customer information fields in the Excel invoice automatically from the Access database.
There are a few ways you can approach this task, and each method has plusses and minuses. A relatively simple approach is (obviously) to forego Excel altogether and simply do everything in Access. Simple invoices could be created using forms, and then your data doesn't need to travel between programs.
If you prefer to do the invoice in Excel, then you could create a link in Excel to a query in Access. You create a new query by choosing Data | Import External Data | New Database Query. This starts a Wizard that asks you questions about what you want to import. By selecting the database, the table, and the column of data you require via the options in the Wizard, Excel pulls all the Access records into the worksheet and will automatically update (re-populate) the information each time the workbook opens. You can then, within Excel, access the imported information using formulas that utilize various lookup functions.
Another approach is to develop your own set of VBA macros to grab the information from the Access database. This is not a trivial task, as it involves knowing how to access, via VBA, objects in both Excel and Access. You'll also need to know how to put together SQL statements to extract only the data you want from the database. The upside of slogging through creating the macros is that they provide the most flexibility possible in grabbing data and manipulating it.
Creating the exact macros you need is beyond the scope of this simple tip. You can find more information by getting a few good VBA programming books (make sure you get one specifically for Access as one of the books). The websites available at the Access MVP site may also be helpful:
http://www.mvps.org/links.html#Access
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11842) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Pulling Access Information into Excel.
Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!
When importing Excel information into Access, you need to be concerned with the condition of the data. Here's how to make ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments