Dim as Recordset

  • Thread starter Thread starter Steph
  • Start date Start date
S

Steph

I designed a database, and it because corrupt, so I imported
everything into a new database. I made sure all the references where
put back into the new database. However, when I compiled the VB or
tried to run any of the VB code, I had to remove the as RecordSet from
all Dim statements.

Can anyone please shed any light on this.

TIA
Stephen
 
Stephen said:
-----Original Message-----
I designed a database, and it because corrupt, so I imported
everything into a new database. I made sure all the references where
put back into the new database. However, when I compiled the VB or
tried to run any of the VB code, I had to remove the as RecordSet from
all Dim statements.

Can anyone please shed any light on this.

TIA
Stephen
.
Hi Stephen, it may be that in the original database it was
set to reference the dao or ms activex data-objects object
library. But in the new one it is not set to any or the
wrong object library.

To check and fix, in the design view of a module, from the
Tools menu choose references. Select from the list...

Luck
Jonathan
 
To extend just a little bit on Jonathan's note...

If you are working with DAO, then prefix your datatypes with DAO. For
example:

dim dbs as DAO.Database
dim rst as DAO.Recordset
dim qdf as DAO.Querydef

Do the same for ADO:

dim cnn as ADODB.Connection

HTH

--
Rob

FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Back
Top