Results 1 to 5 of 5
  1. #1
    Join Date
    May 2010
    Posts
    23

    Unanswered: Combo Box Sort Order in Contacts Template

    I’m new to Access 2007. It’s been many years and many versions ago since I’ve regularly tinkered with a database of this complexity.

    In the Contacts Template there’s a combo box on the form “Contact Details” which sorts by first name rather than last. How would I modify this box to sort by last name?

  2. #2
    Join Date
    May 2010
    Posts
    601
    Quote Originally Posted by rlb2252 View Post
    I’m new to Access 2007. It’s been many years and many versions ago since I’ve regularly tinkered with a database of this complexity.

    In the Contacts Template there’s a combo box on the form “Contact Details” which sorts by first name rather than last. How would I modify this box to sort by last name?
    Modify the row source for the combo box to sort by the other field.

    What Access database format is the Contact template and what version of Access you are running?
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

  3. #3
    Join Date
    May 2010
    Posts
    23

    Combo Box row source info

    Access 2007. It might be an Access 2003 template. Not sure.

    This is the row source property info:

    SELECT MSysObjects.Name FROM MSysObjects WHERE (((MSysObjects.Name) Not Like "*Subreport*") AND ((MSysObjects.Type)=-32764)) ORDER BY MSysObjects.Name;

  4. #4
    Join Date
    May 2010
    Posts
    601
    Quote Originally Posted by rlb2252 View Post
    Access 2007. It might be an Access 2003 template. Not sure.

    This is the row source property info:

    SELECT MSysObjects.Name FROM MSysObjects WHERE (((MSysObjects.Name) Not Like "*Subreport*") AND ((MSysObjects.Type)=-32764)) ORDER BY MSysObjects.Name;
    The SQL you posted does not appear to be from any of the Contacts templates. The sql will return list of report objects that do not have "Subreport" in the name.

    I think you are looking at the 2007 template.

    There is a combo box with a label "Go to" in the form header.

    The SQL for that combo box should be this:

    Code:
    SELECT [ID], [Contact Name], [Company], [E-mail Address] FROM [Contacts Extended] WHERE [ID]<>Nz(Form![ID],0) ORDER BY [Contact Name];
    Try this:

    Code:
    SELECT [ID], [Contact Name], [Company], [E-mail Address] FROM [Contacts Extended] WHERE [ID]<>Nz(Form![ID],0) ORDER BY [Last Name];
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

  5. #5
    Join Date
    May 2010
    Posts
    23
    Thanks, HiTech.

    It didn't work for me. Likely I did something wrong.

    Anyway, I've moved on. Started designing my database from scratch. So far having better results that way.

    By the way, I've been to your sight. I'm sure it's a resource I can utilize.

Posting Permissions

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