|
-
May 18th, 2000, 03:55 AM
#1
Thread Starter
Hyperactive Member
in the willmove event of an ADO data control, I am updating the caption to show the cursor location and record count
Code:
Private Sub Adodc1_WillMove(ByVal adReason As ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
Adodc1.Caption = "Record " & Adodc1.Recordset.AbsolutePosition + 1 & " of " & Adodc1.Recordset.RecordCount
End Sub
But when I execute the program, I get a compile error
"Procedure declaration does not match description of event or procedure having the same name"
The same thing happens in some of the other events. WHY? I have all of the references properly set and have no other problems with the operations of the ADO control (add record, delete, etc. work fine)
Thanks,
Andrew Nerney
-
May 18th, 2000, 01:07 PM
#2
Not Sure what to tell you... I pasted the code you used and had it work fine... all accept for when you come to the BOF it moves into negatives and the same when you move to EOF but no errors what so ever...
-
May 18th, 2000, 09:23 PM
#3
Thread Starter
Hyperactive Member
You got a lot further than me, then, since mine won't even compile. I also had some DLL errors when I tried to add certain references, so I am thinking that I need to reinstall VB6. If anybody else has a clue as to what my problem is here then please let me know.
thanks
andrew
-
May 18th, 2000, 11:11 PM
#4
Thread Starter
Hyperactive Member
strangest of causes...
Okay, I found the problem, so for those of you who may read this later:
earlier in the project I had changed the reference from ActiveX 2.0 Object Library to ActiveX 2.1 Object Library so that I would have the latest references. This is apparently what was causing the problem. I started a new project and added an ADODC and it worked fine. When I checked the references, I noticed that difference. So I changed the reference in my project and now it works.
-
May 19th, 2000, 11:16 AM
#5
Glad you figured it out... to explain your problem...
the 2.1 library is used for access 2000 databases
so if you are using an access 97 database you have to use 2.0
-
May 19th, 2000, 10:18 PM
#6
Thread Starter
Hyperactive Member
If that is the case, then this whole thing keeps getting stranger by the minute because I am using Access 2000. I switched the reference and have not had any more problems. Oh well, as long as it works I will be happy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|