Access.2007.VBA.Bibl..

(John Hannent) #1
ErrorHandlerExit:
Exit Function

ErrorHandler:
MsgBox “Error No: “ & Err.Number _
& “; Description: “ & Err.Description
Resume ErrorHandlerExit

End Function

In Access 2007, it is much easier to save a database to an older format, as well as saving
a copy of the database in the current format (the long awaited “Database Save As”); the
three choices are right on the Save As submenu of the Office menu, as shown in Figure 9-21.

FIGURE 9.21
Saving a database in Access 2002-2003 format.

Summary ..........................................................................................................................


In this chapter you learned how to use the Office FileDialogobject to allow easy selection of a
folder for loading or saving documents. In addition, you learned how to use a variety of techniques
for creating text files, saving data to them, and loading data from them to Access tables, using
ADO, the FileSystemObject, and legacy VB statements, and also how to save attachments
from files to the new Attachment field (or extract attachments from such fields and save them as
files), using VBA code. These techniques will allow you to work with text files in a variety of ways,
to add extra functionality to your databases, over and above working with Office documents.

NEW FEATURENEW FEATURE

Part II Writing VBA Code to Exchange Data between Office Components

Free download pdf