Access XP problems

G

gao_jenny

Hi,
I just bought the Microsoft Office Prefessional XP
edition and installed on my PC. but when I used the
Access application, tried to do the following:
Dim db as Database

Visual Basic gives me the complie error: user_defined
type not defined. Can anybody let me know what I should
do?

Also, why after I saved a database copy in XP(version
2002), the database always says on the title bar "Access
2000 file format)?

Thanks for all your help.
Jenny
 
J

John Nurick

Hi,
I just bought the Microsoft Office Prefessional XP
edition and installed on my PC. but when I used the
Access application, tried to do the following:
Dim db as Database

Visual Basic gives me the complie error: user_defined
type not defined. Can anybody let me know what I should
do?

By default, Access 2002 sets a reference to ADO but not to DAO, and ADO
does not have a Database object. You need to use Tools|References to add
a reference to the Microsoft DAO 3.6 library.

Having references to both ADO and DAO can cause some problems because
(for instance) each of them has a Recordset object. Usually if you are
only working with Jet (MDB) databases you can remove the ADO reference.
Otherwise you need to qualify your declarations:
Dim rsR As DAO.Recordset

In many ways it's a good idea always to do that
Dim dbD As DAO.Database
Dim rsR As DAO.Recordset
so the reader is always sure what's going on.
Also, why after I saved a database copy in XP(version
2002), the database always says on the title bar "Access
2000 file format)?

By default, Access 2002 uses the Access 2000 file format. You can change
this in Tools|Options|Advanced.
 
H

Homi

You need to set references to the Dao library. See Tools
References in the vb editor screen. You are missing the
Dao libraries. the xp verion uses Ado data sets you may
want to convert your programs to reflect Ado connections.
 

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