From: wallymeister on 6 Apr 2010 13:01 I have a form based on a 2 table query. User will use shortcut menu to filter records down to what they want to work on and sort accordingly. I have a button to remove all filters but I also want to remove any sorts that were applied and I can't seem to get that part to work. I use the following to remove all the filters. I just need help with the code to get the form back to the original underlying query sort. On_Click event of button control Me.Filter = "" FilterOn = False Like I said, this brings back all records but the sort stays. I am using Access 2007 Any help is greatly appreciated. Wally
From: Dirk Goldgar on 6 Apr 2010 13:09 "wallymeister" <wallymeister(a)discussions.microsoft.com> wrote in message news:58A40704-3438-4B3A-8E12-89AA80A10AD9(a)microsoft.com... >I have a form based on a 2 table query. User will use shortcut menu to > filter records down to what they want to work on and sort accordingly. I > have a button to remove all filters but I also want to remove any sorts > that > were applied and I can't seem to get that part to work. I use the > following > to remove all the filters. I just need help with the code to get the form > back to the original underlying query sort. > > On_Click event of button control > Me.Filter = "" > FilterOn = False > > Like I said, this brings back all records but the sort stays. > I am using Access 2007 Me.OrderBy = "" Me.OrderByOn = False -- Dirk Goldgar, MS Access MVP Access tips: www.datagnostics.com/tips.html (please reply to the newsgroup)
From: wallymeister on 6 Apr 2010 14:39 Thanks Dirk, I swear I tried that before and it didn't work so I thought there might be something different with 2007, but it worked this time so I must have done something wrong. Thanks again Wally "Dirk Goldgar" wrote: > "wallymeister" <wallymeister(a)discussions.microsoft.com> wrote in message > news:58A40704-3438-4B3A-8E12-89AA80A10AD9(a)microsoft.com... > >I have a form based on a 2 table query. User will use shortcut menu to > > filter records down to what they want to work on and sort accordingly. I > > have a button to remove all filters but I also want to remove any sorts > > that > > were applied and I can't seem to get that part to work. I use the > > following > > to remove all the filters. I just need help with the code to get the form > > back to the original underlying query sort. > > > > On_Click event of button control > > Me.Filter = "" > > FilterOn = False > > > > Like I said, this brings back all records but the sort stays. > > I am using Access 2007 > > > Me.OrderBy = "" > Me.OrderByOn = False > > > -- > Dirk Goldgar, MS Access MVP > Access tips: www.datagnostics.com/tips.html > > (please reply to the newsgroup) >
|
Pages: 1 Prev: Memo Box Resize in Form View Next: Recreate VLookup in MS Access 2003 Form Using DLookup..... |