Migration from a97 to a2003

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

While migrating i am facing a problem with the vb code that is used in
forms.A few forms uses codes as 'Dim t as Table','Dim d as database' for
which it says user type not defined and throws an error.Does 97 use an older
version of VB which is not compatible with the newer version or i am missing
any reference?
If there is a version problem with VB do we need to re write the code?
 
hi,
While migrating i am facing a problem with the vb code that is used in
forms.A few forms uses codes as 'Dim t as Table','Dim d as database' for
which it says user type not defined and throws an error.Does 97 use an older
version of VB which is not compatible with the newer version or i am missing
any reference?
You need to reference 'Microsoft DAO 3.6 Object Library'.
If there is a version problem with VB do we need to re write the code?
Change all declarations of DAO objects like the following:

Dim t As Table -> As DAO.Table
Dim r As Recordset -> As DAO.Recordset

Some of them occur in more than one namespace, e.g. Recordset.

mfG
--> stefan <--
 
While migrating i am facing a problem with the vb code that is used in
forms.A few forms uses codes as 'Dim t as Table','Dim d as database' for
which it says user type not defined and throws an error.Does 97 use an older
version of VB which is not compatible with the newer version or i am missing
any reference?
If there is a version problem with VB do we need to re write the code?

You need to change your References. A97 defaulted to the DAO object
model; A200x defaults to the ADO object model.

Open any module in the VBA editor and select Tools... References. If
you're not intentionally using any ADO code, uncheck the Microsoft
ActiveX Data Objects reference; then scroll down to Microsoft DAO 3.6
Object Library and check it.

John W. Vinson[MVP]
 

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

Back
Top