Microsoft KB Archive/152760

= ACC95: Database Password That Contains a Space Becomes Invalid After Compact =

Article ID: 152760

Article Last Modified on 1/26/2005

-

APPLIES TO


 * Microsoft Access 95 Standard Edition

-



This article was previously published under Q152760





SYMPTOMS
When you set a database password that contains one or more spaces, the password becomes invalid after you compact the database.



CAUSE
When Microsoft Access 7.0 compacts your database, it removes all characters after and including the first space it encounters in the database password.



RESOLUTION
Choose a database password that does not contain spaces, or reset the database password you want every time you compact the database.



STATUS
Microsoft has confirmed this to be a problem in Microsoft Access 7.0. This problem no longer occurs in Microsoft Access 97.



Steps to Reproduce Behavior
 Create a new, blank Microsoft Access 7.0 database. Create a database password for the new database. To do so, follow these steps:

 Close the database. On the File menu, click Open Database. Click the Exclusive check box, and then open the database.</li> On the Tools menu, point to Security, and then click Set Database Password.</li> In the Password box, type this password: New Password. Be aware that passwords are case-sensitive.</li> In the Verify box, confirm your password by typing the password again, and then click OK.</li></ol>

The password is now set. The next time you or another user opens the database, a dialog box will be displayed that requests a password. (Remember that a password is case-sensitive; you must type it exactly as defined.)</li> Close the database and reopen it. When prompted, type the database password: New Password. The database will open without any problems.</li> Close the database again. On the Tools menu, point to Database Utilities, and then click Compact Database. Select the new database in the "Database To Compact From" dialog box, and type the password when prompted. Select the same database name in the "Compact Database Into" dialog box, and click Yes to "Replace existing file" prompt.</li> Open the database and try to use the password: New Password. Note that you receive the following error message:

"Not a valid password"

Click OK and try again. This time use the password: New .</li> Note that the database will open because Microsoft Access removed all characters in the password after the word "New" when the database was compacted.</li></ol>

<div class="references_section">