coversion of 2000 file to 97

N

nandkumar nair

I have made a file in Access XP (2000) having a
switchboard. This file needs to be loaded on a computer
which has Office 97.

With the tool available in access (Tools - Database
Utilities - Convert Databse), I did convert this file to
97.

Now, when I open this file in the machine having Access
97, the code of Switchboard is giving as error - it gets
stuck near the statement
"Set con = Application.CurrentProject.Connection"


Could anyone please help

Regards
Nandkumar
 
K

Ki Yi [MS]

Hello,

The code that is created with the switchboard manager is referencing
ADO/Access
10 objects. Access 97 does not understand this.



There are two possible solutions to this problem.


Solution 1: Re-create the Switchboard form in Microsoft Access 97



The Switchboard Manager creates and modifies two main objects: the
Switchboard Items table, and the Switchboard form. The Switchboard Items
table contains all the information that defines the items on the
Switchboard, and this information has not significantly changed since
Microsoft Access 97. Therefore, you can use the Switchboard Manager in
Microsoft Access 97 to re-create the Switchboard form by using the
Switchboard Items table from Microsoft Access 2000.

NOTE: The following example assumes that you have already converted a
database with a Switchboard form from Access 2000 to Access 97. If you have
questions about how to do this, follow steps 1 through 17 in the "Steps to
Reproduce the Behavior" section later in this article.



1. After opening the database in Microsoft Access 97, click the Forms
tab. Right-click the Switchboard form, and then click Rename. Rename
the form to Switchboard 2000.

2. Click the Tables tab. Right-click the Switchboard Items table, and
then click Rename. Rename the table to Switchboard Items 2000.

3. On the Tools menu, point to Add-ins, and then click Switchboard
Manager.

4. Click Yes in the dialog box that prompts you to create a new
switchboard.

5. Click Close to close the Switchboard Manager.

6. Click the Tables tab. Rename the Switchboard Items table to
Switchboard Items 97.

7. Rename the Switchboard Items 2000 table to Switchboard Items.

8. Click the Forms tab, and then open the Switchboard form. It should
open successfully, and you should be able to use it without errors.

9. Close the Switchboard form.



After you verify that the Switchboard form works correctly, you can
permanently delete the Switchboard Items 97 table and the Switchboard 2000
form.

Solution 2: Replace the ADO code in the Switchboard form with DAO

NOTE: The following example assumes that you have already created an Access
2000 database with a Switchboard form. If you have questions about how to
do this, follow steps 1 through 17 in the "Steps to Reproduce the Behavior"
section later in this article.


1. Open the Switchboard form in Design View.

2. On the View menu, click Code to open the form's module in the Visual
Basic Editor.

3. Locate the FillOptions() procedure, and make the following modifications
to it.


Replace the following line of code

Set con = Application.CurrentProject.Connection

with:

Set con = CurrentDb

Replace the following line of code

rs.Open stSql, con, 1 ' 1 = adOpenKeyset

with:

Set rs = con.OpenRecordset(stSql)


Remove the following line of code:

Set rs = CreateObject("ADODB.Recordset")

Locate the HandleButtonClick() procedure, and make the same modifications
that you
just made to the FillOptions() procedure.

4. On the Debug menu, click Compile <ProjectName>.

5. Close and save the Switchboard form.

6. Convert the database to Access 97. For additional information on how
to do this, follow steps 15 through 17 in the "Steps to Reproduce the
Behavior" section later in this article.



The Switchboard form should now open successfully in Microsoft Access 97.

I hope this helps! If you have additional questions on this topic, please
reply to this posting.

Regards,

Ki Yi
Microsoft Support

This posting is provided AS IS with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top