Are you sure this is the only declaration of this procedure you have, do a
search on datPrimaryRS_MoveComplete in your code.
The declaration you have shown here is correct for an ADO recordset or the
ADO control.
' Recordset declaration
Private Sub datPrimaryRS_MoveComplete( _
ByVal adReason As ADODB.EventReasonEnum, _
ByVal pError As ADODB.Error, _
adStatus As ADODB.EventStatusEnum, _
ByVal pRecordset As ADODB.Recordset _
)
'
End Sub
' ADO control declaration
Private Sub datPrimaryRS_MoveComplete( _
ByVal adReason As ADODB.EventReasonEnum, _
ByVal pError As ADODB.Error, _
adStatus As ADODB.EventStatusEnum, _
ByVal pRecordset As ADODB.Recordset _
)
'
End Sub
And matches what is shown in the typelib for msado25.
HRESULT MoveComplete(
[in] EventReasonEnum adReason,
[in] Error* pError,
[in, out] EventStatusEnum* adStatus,
[in] _Recordset* pRecordset);
If you don't have multiple declarations then check the declaration of the
event in the ADO typelib you are referencing (you can do this using
OLEView).
--
Terry Kreft
MVP Microsoft Access
"Shailaindra Sharma" <sh****@hotmail.com> wrote in message
news:41**********@127.0.0.1...
The Following code generates Error while compiling:
Private Sub datPrimaryRS_MoveComplete(ByVal adReason As
ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As
ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
'This will display the current record position for this recordset
datPrimaryRS.Caption = "Record: " &
CStr(datPrimaryRS.Recordset.AbsolutePosition)
End Sub
The Error Message is:
"Compiler Error:
Procedure declaration does not match description of event or procedure
having the same name"
If some one could help tracking the problem
Thanx
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!