Results 1 to 2 of 2
  1. #1
    jlgray0127 is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Oct 2011
    Location
    Central Illinois
    Posts
    193

    Custom sorting a form based on another form

    I have a form with 9 different fields I want to be able to sort against.
    I have another form, which contains the conditions I need to be able to sort by. I somehow need to be able to say field 1, if value is = to field Form!AnotherForm!Criteria, sort by Form!AnotherForm!SortOrder

    Clear as mud?

    Basically, My main form has a value for these fields, which equals the criteria listed listed in the other form.

    So my sort button needs to be something like, where "MainForm!Field1 = Anotherform!Criteria, Sort MainFrom!Field1 by Anotherform!SortOrder



    The Sort Order needs to be able to be adjusted, depending on the data we are analyzing... I wish we could just filter, but that is not the case, we have to see it in order.

    If there is another easier way, that is just not coming to me, to be able to do this, that would be great! I don't know how to relate the tables in the back ground, because there are 9 fields we have to be able to look at and sort, so it's a MANY, MANY (9) to one relationship, which always seems buggy or just doesn't work...

    Thanks, in advance!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    You can manipulate the record source of the form, setting it to SQL with the appropriate sort. You can also set the Order By property to the desired field name.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Custom Sorting Methods for End User?
    By kd2017 in forum Database Design
    Replies: 29
    Last Post: 03-16-2018, 08:04 AM
  2. Custom Grouping & Sorting (pics attached)
    By Eirini_kap in forum Reports
    Replies: 8
    Last Post: 02-03-2016, 11:00 AM
  3. custom sorting with IIF statement
    By orangeman2003 in forum Access
    Replies: 5
    Last Post: 05-13-2014, 03:38 PM
  4. Custom sorting records in report
    By tanyapeila in forum Reports
    Replies: 4
    Last Post: 03-26-2014, 12:32 PM
  5. Sorting Report Based off of a Combo Box in a Form
    By datadude60 in forum Reports
    Replies: 4
    Last Post: 04-30-2012, 10:38 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