Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Nov 2002
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    orderby and form filters (2002)

    Hi all, i'm having some trouble with sorting (descending by appointment dates) on a form. I would like this form to open with a filter on (opened to show only those records with a chk box value <>-1 , and sorted DESC by date. I can get this to work w/o problems. Now, i have another chk box (in the form header), which when =-1, will show all records....problem is, they're not sorted and i can't seem to get them to show in the sort order i want (which is DESC by date). Any help on this would be greatly appreciated. thanks, Van

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: orderby and form filters (2002)

    If you're using VBA to turn the filter on and off, you can add code to sort the records:

    Me.OrderBy = "[fieldname] DESC"
    Me.OrderByOn = True

    where fieldname must be replaced by the actual name of the date field you want to sort on.

  3. #3
    Star Lounger
    Join Date
    Nov 2002
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: orderby and form filters (2002)

    thanks Hans, that works great. Van <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

Posting Permissions

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