O'Reilly logo

Beginning Access™ 2007 VBA by Denise Gosnell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required