Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303

    Unanswered: go to a specific record ADO

    How do you move to a specific record using ADO commands?

    The code from where I want to execute this is in a module (not behind the form).
    I don't think that the recordset clone does me any good.
    Seek is only supported with server-side cursors.
    Find works great, but how do I make the current record on the form the same as the record I found?

    I'm not sure I understand the gotorecord command.
    DoCmd.GoToRecord acDataForm, frmMain, acGoTo, intRecord

    I believe that this requires that I know which record# the record I want to goto is.

    Any idears?
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Since you're using ADO you'll have to provide your own record count as you iterate thru the recordset ... That is your record # to perform the GoTo action with ... Remember Record #'s start with 1 ...

  3. #3
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303
    You mean I'll have to set up a recordset, and then loop through

    something like,

    movefirst
    intRecordCount = 0
    do while not eof
    intRecordCount = intRecordCount + 1
    are you my record?
    if yes
    get out
    end if
    movenext
    loop
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Back up ... What is the form based on record source wise? Table? Query? Recordset?

    And judging by the last reply what are you looking to do?

  5. #5
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303
    didn't mean to complicate things

    This is what I want to do. Replicate the exact functionality of the attached function using ADO.

    It looks for the record I send it and then takes the user to that record.
    The main form is based on a table.
    Attached Files Attached Files
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •