Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002

    Unanswered: How to sort in Form records dynamically ??

    I have written 1 query, which has 3 table's combination.

    I am using that Query in Form to display multiple tabular records.

    But Before/while doing Docmd.Openform, I want to sort the future result based on certain 'Order By' condition. I want to give this 'Order By' dynamically.

    Is there any way to do it ??


  2. #2
    Join Date
    Aug 2002
    Charlotte NC
    How do you think you will be giving the order by info to the application?
    popup dialog box?

  3. #3
    Join Date
    Oct 2002

    I got solution.

    I had 2 forms.

    Form1: Which decides ORDER BY string
    Form2: which follows Forms1's ORDEr BY string.

    In Form1, I created 4 dropdown fields, they are using 'List of Values' using Value-List (Hard coded options. i.e. Customername, Model, Formula, Thickness).

    Once all 4(or any one OR none) 'order by' is choosen. I am combining them in field(of Form1) named Me.OrderByParam.

    And Hit Button OK in Form1. So Form2 will be open.


    Now, in Form2, In 'Open Form' event. I am assinging

    Me.OrderBy = [Form]![Form1].OrderByParam

    So, Form2's result will be sorted according to ORDER BY choosen in Form1.

    Thanks for your try.

Posting Permissions

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