Clear a filter and Show all data on continuous form via a command button is not working properly

wire_jp
StarLounger
Posts: 67
Joined: 19 Jan 2018, 00:00

Clear a filter and Show all data on continuous form via a command button is not working properly

Post by wire_jp »

Hello,

I have a form called "frmAnyOtherVolAreasSearchByName" and there is a "Show All" command button to clear the filter and show all data on the continuous form. The data is not clearing the filter to show all of the data.

Similar issue with the form called "frmAnyOtherIdeasSearchByName".

The One Drive link with the MS database is attached: =

https://1drv.ms/f/s!AtOdPG-IN8CYgcV-YYl ... Q?e=Sbf4vE

Kind regards,

wirejp
Last edited by wire_jp on 24 Nov 2023, 15:57, edited 1 time in total.

User avatar
Gasman
2StarLounger
Posts: 104
Joined: 22 Feb 2022, 09:04

Re: Clear a filter and Show all data on conftinuous form via a command button is not working properly

Post by Gasman »

I generally set the filter to "" AND switch the filter off.
Using Access 2007/2019.
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
Please, please use code tags when posting code snippets, click the </>icon.
Debug.Print is your lifesaver.

User avatar
HansV
Administrator
Posts: 78512
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Clear a filter and Show all data on conftinuous form via a command button is not working properly

Post by HansV »

As Gasman wrote, this should be sufficient:

Code: Select all

Private Sub CmdAnyOtherVolAreasNameShowAll_Click()
    Me.Filter = ""
    Me.FilterOn = False
End Sub
Best wishes,
Hans

wire_jp
StarLounger
Posts: 67
Joined: 19 Jan 2018, 00:00

Re: Clear a filter and Show all data on conftinuous form via a command button is not working properly

Post by wire_jp »

ok, Gasman and Hans: thank you for your kind help. As always, I appreciate your help.