Sub Form to sort on opening RRS feed

  • Question

  • I have a sub form on my form and I want it to sort by date only when I open my form not when I'm entering the  Data, is this possible to code?

    The record source is a Table

    Thanks For any Help..........................Bob


    Tuesday, January 10, 2017 11:34 PM


All replies

  • Hi Bob,

    Form sorting can be controlled by the OrderBy and OrderByOn properties. You should be able to use them to sort or not sort your form when you need to.

    Hope it helps...

    Tuesday, January 10, 2017 11:41 PM
  •  DB,Changing to a query and not the table a good idea and sort by query ..Thanks Bob


    Tuesday, January 10, 2017 11:49 PM
  • Yes, you can switch to a sorted query but you might still have to manipulate the properties I mentioned if you want to change or turn off the sort when you're entering data.

    Just my 2 cents...

    Tuesday, January 10, 2017 11:51 PM
  • Thanks DB doesn't sort while entering data, only when I close the form and reopen it :)

    Cheers ...Bob


    Tuesday, January 10, 2017 11:55 PM
  • Excellent! Good luck with your project.
    • Marked as answer by TurnipOrange Wednesday, January 11, 2017 12:06 AM
    Wednesday, January 11, 2017 12:05 AM