Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003

    Unanswered: How can I sort records on a form?

    I have a "main" form that basically displays one record and all of the fields for that record. There is a next button, previous button, etc.

    Right now, when you go through the records (on my form) it goes by client number (my primary key).

    Can I possibly change it so that when I press next/previous it will go according to last name or something like that?

  2. #2
    Join Date
    Sep 2003
    The extremely Royal borough of Kensington, London
    Select columns
    from table
    order by column.

    As an example, when creating a form with the wizard, select a query as the data source.
    Last edited by r123456; 02-13-04 at 02:11.
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

  3. #3
    Join Date
    Oct 2003
    Can I do this even those the form is already made and all the fields are already there? (it took quite some time to get all the fields there with the positioning just right, etc)

  4. #4
    Join Date
    Feb 2004
    Go to the Form Design and in the properties there is an Order By option (under the Data Tab)

    For example if you want to sort by account code and the is the source of the data is a query type QueryName.[Account Code]

    Square brackets required if you have used spaces in field names. If you want multiple criteria use something like

    QueryName.[Account Code],QueryName.Date etc etc

Posting Permissions

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