Navron
Navron

Reputation: 145

User defined type not defined ActiveX Data Objects

The following snippet of code generates the error in the heading

Private Sub ppdatPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, 
ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, 
ByVal pRecordset As ADODB.Recordset20)

Dim Position As Long
Position = datPrimaryRS.Recordset.AbsolutePosition
If Position = -1 Then Position = 0
datPrimaryRS.Caption = "Record: " & CStr(Position)
End Sub

I am using the Microsoft ActiveX Data Objects 2.0 Library as reference, as such I am not sure of the source of this error. I have also tried with the Microsoft ActiveX Data Objects 2.0 Library since I am running Windows 7.

Upvotes: 0

Views: 213

Answers (1)

lardymonkey
lardymonkey

Reputation: 768

I've just given it a go and it looks like the error is coming from the ADODB.Recordset20. If you remove the 20 from the end then it will be ok, or you could reference the Microsoft ActiveX Data Objects 2.6 instead if you can't change the declaration.

Upvotes: 1

Related Questions