Compilation error

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

Guest

Hello,

How are you today?

Converting my database to an access project.

Dim db As Database

threw an error, so I changed this to:

Dim db As ADODB.Connection

However, now getting an error message when I compile:

User-defined type not defined

Any idea why this might be occuring?
 
WIthout seeing the rest of your code it is difficult to
tell, but I would guess you are converting some old
MDB/DAO code to ADP/ADO? A lot of the set-up code for an
ADO connection is different to DAO, so you may need to
change more than you think, e.g.

Dim MyRS as ADODB.Recordset, MyDB as ADODB.Connection

Set MyDB=currentproject.connection
set myrs=new adodb.recordset

mydb.usp_MyStoredProcedureName MyRS

Do Until MyRS.EOF
....etc
 
Back
Top