Hi
I'm a novice when it comes to vba.
I want to put a button on a form that removes any filter applied to it.
I know the on click needs to be me.filter=""
however, the next step is i only want the button visible if there is a filter applied.
i want to put some code in the onload event of the form.
I think it is something like this, but cant figure out exactly what i need:
If Me.Filter = "" Then Me.btnUnFilter.Visible = False Else Me.btnUnFilter.Visible = True
End If
Please can you advise where im going wrong.
Thanks in advance
I'm a novice when it comes to vba.
I want to put a button on a form that removes any filter applied to it.
I know the on click needs to be me.filter=""
however, the next step is i only want the button visible if there is a filter applied.
i want to put some code in the onload event of the form.
I think it is something like this, but cant figure out exactly what i need:
If Me.Filter = "" Then Me.btnUnFilter.Visible = False Else Me.btnUnFilter.Visible = True
End If
Please can you advise where im going wrong.
Thanks in advance