Results 1 to 3 of 3
  1. #1
    bugman61 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    2

    Multi Valued field sort

    I have a report where I am trying to display the items in a multi valued field sorted by name. The report is based on a "Meetings" table with a multi valued field (Participants) linking to a "People" table. The problem is that I can never get the people sorted by name, it always sorts by the associated ID in the People table. The SQL I have right now is as follows:



    SELECT People.ID, People.FirstName+" "+People.LastName AS Expr1
    FROM People
    ORDER BY People.LastName, People.FirstName;

    Any help would be greatly appreciated.

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    I initially focused on the multi value field type - as this field type is kind of a pain for which alot of developers avoid.......but I noticed in this case perhaps your issue is that the sorting of a report when it is defined in the report property overrides the sorting of the record source. And since you presented the sql of the record source and didn't discuss the sort property of the report - take a look at implementing it there and see if that works for you......

    hope it helps.

  3. #3
    bugman61 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    2
    Thanks for the help.

    The Meetings report is filtered down to a single meeting based on user selection, i.e. the click a button to get the report for meeting 5. The values from the multivalued field are displayed in a text box on the report. I do not have anything in the Order By property for the report since it always shows 1 record. I did try playing around with it, and it had no effect.

    Elsewhere on the form for the user to enter the meeting information, I had no trouble at all setting up the order for names in the drop down box for selecting the values for the participants field - it acutally the exact same SQL for the Row Source. I just wish I could figure out how to get the names to display correctly on the report.

    When I started this project I hadn't ever used access and only did some minor SQL and CFM programming 10 years ago. I had a sneaking suspicion that using the multivalued field might be a pain down the road but did it anyway.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. querying Multi-valued fields
    By switters in forum Queries
    Replies: 1
    Last Post: 04-21-2011, 10:59 AM
  2. Sort according to field length?
    By wawinc in forum Queries
    Replies: 4
    Last Post: 12-15-2010, 04:27 PM
  3. Append Query - Multi-Valued Field
    By catat in forum Queries
    Replies: 0
    Last Post: 05-11-2010, 01:52 PM
  4. Macro Button to Sort Field A-Z
    By rdirosato in forum Access
    Replies: 1
    Last Post: 03-11-2010, 10:32 PM
  5. Multiple valued field locking tables
    By Jamy in forum Programming
    Replies: 6
    Last Post: 02-19-2010, 11:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums