-->
- Microsoft Access Database Help - Microsoft Access Database Consulting Services. Microsoft Access Database Consulting, Database Development, Database Training, and Database Repair Services.
- SAS/ACCESS Interface to PC Files works with Microsoft Access database 97, 2000, 2002, 2003, 2007, 2010, and later files. A database is a collection of information that is related to a particular subject or purpose, such as tracking customer orders or maintaining a music collection.
You can use Access 2016, Access 2013, Access 2010, or Access 2007 to create files in earlier file formats (for example, Access 2000 and Access 2002-2003). Using Access, you can: Add new data to a database, such as a new item in an inventory. Edit existing data in the database, such as changing the current location of an item.
This article fixes an issue that occurs when you use the DAO library to convert a database. Builddesk u crack me up memes.
Note
Office 365 ProPlus is being renamed to Microsoft 365 Apps for enterprise. For more information about this change, read this blog post.
Original KB number: 888634
Note
This article applies to a Microsoft Access database (.mdb) file or to a Microsoft Access database (.accdb) file. Requires basic macro, coding, and interoperability skills.
Symptoms
When you try to open a database in Microsoft Access 2000 or a later version, you receive the following error message:
The database is in an unexpected state
Cause
This problem may occur when you use the Data Access Object (DAO) library to convert a database that you created in Microsoft Access 97 or an earlier version by using the CompactDatabase
method. TheCompactDatabase
method may leave the new database in a partially converted state.
Resolution
To resolve this problem, use one of the following methods.
Method 1: Use the Convert Database command when you have the original database
If you still have a copy of the original database in its original format, use the Convert Database
command. To do this, follow these steps:
Access 2000, Access 2002, or Access 2003
Make a backup copy of the original database.
Start Access 2000 or a later version.
On the Tools menu, click Database Utilities, click Convert Database, and then click To Access 2000 File Format.
Note
If you are using Access 2000, only To Current Access Database Version appears on the Convert Database menu.
In the Database to Convert From dialog box, click the database file name that you want to convert, and then click Convert.
In the Convert Database Into dialog box, type the new name of the database file, and then click Save.
Ms Access Help
Access 2007
- Make a backup copy of the original database.
- Try to open that database.
- When you open an Access 97 or Access 95 file format .mdb database, Access displays the Database Enhancement dialog box. You are prompted to upgrade the database.
- Click Yes to upgrade the database to whichever file format you have selected as the default file format in Access 2007. After you convert the database, you can make design changes to the file in Access 2007. However, you can no longer open the database by using a version of Access earlier than the version to which you converted the database.
Method 2: Recover the database data and the database queries when you do not have the original nonsecured database
If you do not have a copy of the original nonsecured database in its original format and you have tried standard corruption troubleshooting techniques, try to recover the database data and the database queries. To do this, follow these steps:
Make a backup copy of the original database.
Start Access 2000 or a later version.
Access 2000, Access 2002, or Access 2003
- Click Blank Access database, type the new database name in the File name box, and then click Create.
Access 2007
- Click Office button, click New, click Blank Database, and then click Create to create a new blank database.
Access 2000, Access 2002, or Access 2003
- On the Insert menu, click Module. The Microsoft Visual Basic Editor starts, and a new module is created.
Access 2007
- On the Create tab, click the down arrow below Macro, and then click Module. The Microsoft Visual Basic Editor starts, and a new module is created.
On the Tools menu, click References.
In the Available References list, locate Microsoft DAO 3.6 Object Library, and then click to select the Microsoft DAO 3.6 Object Library check box.
Note
DAO 3.6 is also available on Windows XP Home Edition.
To close the References dialog box, click OK.
Paste the following code into the new module that you created.
Note
The code will try to import all tables and all queries from the corrupted database into the current database. Replace
C:My DocumentsyourDatabase.mdb
with the correct path and file name of your database.To run the code, click Run Sub/UserForm on the Run menu.
Method 3: Recover the database data when you do not have the original secured database
If you do not have a copy of the original secured database in its original format and you have tried standard corruption troubleshooting techniques, try to recover the database data. To do this, follow these steps:
Make a backup copy of the original database.
Start Access 2000 or a later version.
Access 2000, Access 2002, or Access 2003
- Click Blank Access database, type the new database name in the File name box, and then click Create.
Access 2007
- Click the Microsoft Office Button, click New, click Blank Database, and then click Create to create a new blank database.
Access 2000, Access 2002, or Access 2003
- On the Insert menu, click Module. The Microsoft Visual Basic Editor starts, and a new module is created.
Access 2007
- On the Create tab, click the down arrow below Macro, and then click Module. The Microsoft Visual Basic Editor starts, and a new module is created.
On the Tools menu, click References.
In the Available References list, locate Microsoft DAO 3.6 Object Library, and then click to select the Microsoft DAO 3.6 Object Library check box.
To close the References dialog box, click OK.
Paste the following code into the new module that you created.
Note
The code will try to import all tables from the corrupted database into a backup database. Replace the variables in the table after step 10 with your database file locations and your user settings.
In the list of functions, select BackupSecureDatabase.
To run the code, click Run Sub/UserForm on the Run menu. How to download itunes free.
Variable Description strSecurePathToDatabase
Location of secured database file strSecurePathToWorkgroupFile
Location of workgroup file strSecureUser
Secured user logon name strSecurePwd
Secured user logon password strTempPathToDatabase
Location of temporary database file strBackupPathToDatabase
Location of backup database file strLogPath
Location of log file
Status
Microsoft Access Database Help
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the 'Applies to' section.
More Information
Microsoft Access Support Ending
For more information about how to troubleshoot corruption in a Microsoft Access database, see the following article: