Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Oct 2001
    Location
    San Bernardino, California, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have a form that I would like to have sorted and displayed by last name (Lastname). How do I do this? I sorted the underlying table but that does not seem to help.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Create a query based on the table that sorts the records the way you want, and use the query as record source for the form.

    BTW, unlike forms, reports ignore the sort order of their record source. For a report, you must specify the sort order in the Sorting and Grouping dialog.

  3. #3
    5 Star Lounger
    Join Date
    Oct 2001
    Location
    San Bernardino, California, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you. Does this mean I will need to run the query each time I open the form in question? If so, how can I automate that so that new record entries will be correctly sorted when I next open that form?


    [quote name='HansV' post='796975' date='08-Oct-2009 09:57']Create a query based on the table that sorts the records the way you want, and use the query as record source for the form.

    BTW, unlike forms, reports ignore the sort order of their record source. For a report, you must specify the sort order in the Sorting and Grouping dialog.[/quote]

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    [quote name='Don_Sadler' post='796989' date='08-Oct-2009 20:55']Does this mean I will need to run the query each time I open the form in question?[/quote]
    No! If you set the Record Source property of the form to the name of the query, the form will automatically run the query when it opens. You don't have to do or set anything extra.

  5. #5
    5 Star Lounger
    Join Date
    Oct 2001
    Location
    San Bernardino, California, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Cool! Thanks again.

    [quote name='HansV' post='796991' date='08-Oct-2009 12:03']No! If you set the Record Source property of the form to the name of the query, the form will automatically run the query when it opens. You don't have to do or set anything extra.[/quote]

Posting Permissions

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