Microsoft KB Archive/294228

= ACC2002: &quot;Command Not Available&quot; Error on Converted Switchboard Form =

Article ID: 294228

Article Last Modified on 10/20/2003

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q294228



Moderate: Requires basic macro, coding, and interoperability skills.

For a Microsoft Access 2000 version of this article, see 208195.



SYMPTOMS
After you convert a database that you created with the Database Wizard in an Access 97 or earlier version of Microsoft Access, you may receive the following error message when you click the Change Switchboard Items button on the Main Switchboard form:

Command Not Available



CAUSE
There is a line of code in the Main Switchboard form's class module that references an earlier version of an Access wizard. This line of code must be modified for Access 2000.

NOTE: In Access 2002, when you convert a database, by default it is converted to an Access 2000 file format. If you have changed the default to convert files directly to Access 2002, you must still follow the steps that are mentioned in this article.



RESOLUTION
To modify the line of code, follow these steps:  Start Access 2002 and open the converted database. Open the Main Switchboard form in Design view. On the View menu, click Code. Select HandleButtonClick in the Procedure box of the form's Module window.  Locate the line in the HandleButtonClick function that reads:

Application.Run &quot;WZMAIN80.sbm_Entry&quot; If you converted from Access 95, the original line reads: Application.Run &quot;WZMAIN70.sbm_Entry&quot;   Change the line to read: Application.Run &quot;ACWZMAIN.sbm_Entry&quot; </li> Save the form and close it.</li></ol>

<div class="moreinformation_section">

Steps to Reproduce the Behavior
Create a database in Microsoft Access 97 as follows:
 * 1) Start Microsoft Access 97.
 * 2) When the Microsoft Access dialog box appears as the program starts, click Database Wizard in the Create a New Database Using box. If Microsoft Access 97 is already open, click New Database on the File menu.
 * 3) In the New dialog box, click the Databases tab, and then click Book Collection.mdz. Click OK.
 * 4) In the File New Database dialog box, type Book97.mdb in the File name box, and then click Create.
 * 5) When the Database Wizard starts, click Finish.
 * 6) After the database is created, quit Access 97.

Convert the database in Microsoft Access 2002 as follows:
 * 1) Start Access 2002 and open the Book97.mdb database.
 * 2) In the Convert/Open Database dialog box, click Convert Database, and then click OK.
 * 3) In the Convert Database Into dialog box, type Book2002.mdb in the File name box, and then click Save.
 * 4) When the Main Switchboard form opens, click the Change Switchboard Items button. Note that you receive the error &quot;Command not available.&quot;

<div class="references_section">