Chapter 7. Importing, Linking, and Exporting Using External Data Source

Chapter 5 covered the basics of using ADO and SQL to work with data sources. All the ADO and SQL examples dealt with data stored in tables in a database. However, in today's world of technology, you will often work with data and applications in a variety of formats, such as text files and spreadsheets. You may need to import or link data from various sources into your database to avoid having to retype all the information that is already stored electronically in another format. At some point, another application might need the data in your application or you may want to get data out of your application for another reason. In that case, you can export information from your application into another format.

In this chapter, you will explore the various ways to use VBA code to link, import, and export to external data sources. The chapter will cover:

  • The difference between linking, importing, and exporting

  • Linking, importing, and exporting to external Access databases (MDB files)

  • Linking, importing, and exporting to SQL Server databases

  • Linking, importing, and exporting to other files such as spreadsheets and text files

  • Creating and sending an e-mail programmatically

These techniques will enable you to build robust applications that interact with various applications and formats.

Get Beginning Access™ 2007 VBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.