Click to See Complete Forum and Search --> : MoveComplete Event


ecannizzo
July 31st, 2000, 09:49 AM
I am trying to use this code:

Private Sub datSongs_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, _
ByVal perror As ADODB.Error, adStatus As ADODB.EventStatusEnum, _
ByVal pRecordset As ADODB.Recordset)

Debug.Print "MoveComplete"

If pRecordset.EOF Or pRecordset.BOF Then
Else
Call ControlsTagLoad(pRecordset)
End If

End Sub

But when I try to run my form I get this error:
Compile error: Procedure operation does not match description of event or procedure having the same name.

This should just be an event that runs when the form is loaded.

Any ideas?

Thanks!
Erica

TCartwright
July 31st, 2000, 05:22 PM
It is telling you that the code :
"Private Sub datSongs_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, _
ByVal perror As ADODB.Error, adStatus As ADODB.EventStatusEnum, _
ByVal pRecordset As ADODB.Recordset)"

does not match the parameters of the existing object. Let me guess, you copied that portion of the code in from somewhere else? Try deleting the code, and selecting the event from the dropdown for that object so that VB will write out that event declaration.. Hope this helps.




Tim Cartwright 'Will write code for food.
Sr Systems Architect - Information Systems
Splitrock Services Inc.

July 31st, 2000, 08:17 PM
I'm sure you're using Microsoft ActiveX Data Objects 2.1 Library in Project References. You should using the 2.0 or 2.5 version. Microsoft has confirmed this is a bug related to ADO. Check Microsoft site for more information.

oneshadow