Alison Balteramp;#039;s Mastering Microsoft Office Access 1002003 [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Alison Balteramp;#039;s Mastering Microsoft Office Access 1002003 [Electronic resources] - نسخه متنی

Alison Balter

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید



Converting an Access Database


Access 2002 and 2003 make it much easier to interact with other versions of Access. Access 2002 and 2003 allow you to open, read, and update Access databases stored in the Access 2000 file format, without converting the files to the Access 2000 file format! Furthermore, Access 2002 and 2003 allow you to easily convert files stored in the Access 2002-2003 file format to either the Access 97 or the Access 2000 file format.

To convert an Access 2002-2003 database to a format compatible with an earlier version of Access, select Tools, Database Utilities, Convert Database, To Access 2000 File Format or Tools, Database Utilities, Convert Database, To Access 97 File Format.

As mentioned earlier, you can use Access 2000 files in Access 2002 and Access 2003. If you wish to convert an open database stored in the Access 2000 file format to the Access 2002-2003 file format, select Tools, Database Utilities, Convert Database, To Access 2002-2003 File Format.

Prior to Access 2002, when problems occurred during the conversion process, users were left wondering exactly what had gone awry. Access 2002 and Access 2003 address this problem. If errors occur while converting from earlier versions of Access to the Access 2002-2003 file format, Access creates a table listing each error. You can easily use the data in this table to handle the conversion problem gracefully.

A method introduced with Access 2002 makes it easy to programmatically convert an Access database from one version to another. The code looks like this:

Sub ConvertAccessDatabase()
Dim strFilePath As String
'Store current file path into variable
strFilePath = Left(CurrentDb.Name, InStrRev(CurrentDb.Name, "\"))
'Delete destination database if it exists
If Len(Dir(strFilePath & "Chap30V97.mdb")) Then
Kill strFilePath & "Chap30V97.mdb"
End If
'Convert source database to Access 97 file format
Application.ConvertAccessProject strFilePath & "Chap30Big.mdb", _
strFilePath & "Chap30V97.mdb", _
DestinationFileFormat:=acFileFormatAccess97
End Sub

To begin, the code declares a string variable. It uses the built-in Left and InStrRev functions to extract the path associated with the current database and place it in the strFilePath variable. If the destination database exists in the current folder, the code deletes it. The code uses the ConvertAccessProject method of the Application object to convert the Chap30Big.mdb database, located in the current folder and stored in the Access 2002-2003 file format, to the Chap30V97.MDB database, located in the current folder and stored in the Access 97 file format.

NOTE

Constants exist for the ConvertAccessProject method that allow you to convert to the Access 2002, Access 2000, Access 97, Access 95, and Access 2.0 file formats.


/ 544