Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2003
    Posts
    280

    Unanswered: How do I move to a specific record?

    Not by criteria but by the indexes of the record.

    Example

    Record 1 is index 1 or first record of the table
    Record 2 is index 2 or second record of the table

    Here is just a testing code I type up to test it out but it did not move back to the first record or to any record I want to, to retrieve a certain data for the particular record I want to move too

    Dim conndb as ADODB.Connection
    Dim rsMinUnit as ADODB.Recordset
    Dim FirstRecord as Variant
    Dim Code as string

    Set conndb = CurrentProject.Connection
    Set rsMinUnit = New ADODB.Recordset

    rsMinUnit.Open "MinUnitData", conndb, adOpenKeyset, adLockPessimistic, adcmdTable

    FirstRecord = rsMinUnit.Bookmark
    rsMinUnit.MoveNext
    rsMinUnit.Move(FirstRecord)
    Code = rsMinunit("ProcedureCode")

    I have ask a lot of question today. Thanks for everyone help.

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    i don't play with ADODB so this is a total guess, but did you consider:
    rsMinUnit.Bookmark = FirstRecord
    instead of your .move(FirstRecord)

    izy

  3. #3
    Join Date
    Apr 2003
    Posts
    280
    wow, lucky guess and it works.

    Now, can you guess me the next winning powerball number.

    Thanks again!

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    post the code for the powerball "random" number generator: we'll see.

    izy

Posting Permissions

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