Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Location
    UK
    Posts
    12

    Unanswered: using option group to set Order property of subform

    Hi guys,

    I have a form that is meant to act as a search form. This form contains a subform displaying the records that match certain criteria selected using controls on the main form. The "search" is implemented as a filter.

    Now, I would like to use an option group to allow the user to select a field on which to sort the records returned and in what order (ascending/descending).

    As I am not using a query, I'm not sure how to do this. I believe it should be implemented in code using the OnClick event of the "Search" button. (Perhaps it could be used somewhere else so that the list of returned records is sorted/ordered without requiring the filter to be reapplied...)

    However, I don't know and can't find out/understand how to do this.

    any help you could offer would be greatly appreciated!

    Regards,

    John
    Last edited by genisys; 12-10-03 at 13:13.

  2. #2
    Join Date
    Dec 2003
    Location
    Toronto, Ont. Canada
    Posts
    238

    Re: using option group to set Order property of subform

    Originally posted by genisys
    Hi guys,

    I have a form that is meant to act as a search form. This form contains a subform displaying the records that match certain criteria selected using controls on the main form. The "search" is implemented as a filter.

    Now, I would like to use an option group to allow the user to select a field on which to sort the records returned and in what order (ascending/descending).

    As I am not using a query, I'm not sure how to do this. I believe it should be implemented in code using the OnClick event of the "Search" button. (Perhaps it could be used somewhere else so that the list of returned records is sorted/ordered without requiring the filter to be reapplied...)

    However, I don't know and can't find out/understand how to do this.

    any help you could offer would be greatly appreciated!

    Regards,

    John
    Hi John...

    If you are already applying the filter and requerying the subform when the user finishes making their choices... Just add a control to let them choose what to sort by... Then in your code... set the OrderBy and OrderByOn properties of the form...

    HTH

Posting Permissions

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