Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2011
    Posts
    2

    Post Unanswered: DoCmd.GoToRecord , , acNext HELP PLS!!!

    Hello,

    Could anyone help me with the following code:

    Private Sub NextRec_Click()
    On Error GoTo Err_NextRec_Click

    DoCmd.GoToRecord , , acNext

    Exit_NextRec_Click:
    Exit Sub

    Err_NextRec_Click:
    MsgBox Err.Description
    Resume Exit_NextRec_Click

    End Sub

    I have created a command buttons in order to go to the next record . But instead of actually going to the next numeric record ( by client #) it actually goes by alphabetical order( by client's name).

    I REALLY appreciate the help!

    Thanks alot!!!

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    If the RecordSet of the form is sorted by client's name, the next record will be the next in alphabetical order. It depends on the sort order set on the form recordset.
    Have a nice day!

  3. #3
    Join Date
    Aug 2011
    Posts
    2
    Thanks a million!!!!

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You're welcome!
    Have a nice day!

Posting Permissions

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