Results 1 to 6 of 6

Thread: Adodc_WillMove compile error

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374

    Angry

    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

  2. #2
    Guest

    Unhappy

    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...


  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374

    Unhappy

    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

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374

    Wink 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.

  5. #5
    Guest

    Smile

    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


  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374

    Question

    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
  •  



Click Here to Expand Forum to Full Width