Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Location
    United Kingdom
    Posts
    56

    Question Unanswered: Command Button to Sort a Field

    Hi Guys,

    I have a comand button on a form and I want it to select a field called [DateOfMI] and sort it (in ascending order).

    So far I have got the code below, but what do I need to put before it to select the [DateOfMI] field?

    Any ideas?

    Rusty


    Code:
    Private Sub cmdSortDateMI_Click()

    DoCmd.RunCommand acCmdSortAscending

    End Sub

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    forms have OrderBy properties.

    Check that out.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Nov 2003
    Location
    Warren, PA
    Posts
    52
    DoCmd.GoToControl "DateOfMI"
    DoCmd.RunCommand acCmdSortAscending

    Brent

Posting Permissions

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