Clearing the Form Filter

G

Guest

Hello.
I have a switchboard with a text box and a button that finds what ever I put
in the text box on a different form (I used the wizard for that). In the
other form I have created a ComboBox with the wizard but now when I use that
combo box to search for other records that I want to appear on the same for
it doesn't. I noticed that in the Form properties there was some information
like [Task ID]='CM041' in the Filter properties. When I removed [Task
ID]='CM041' and went back into the form view I was able to menuever through
my records using the combo box on the form. After initially opening the form
through the switchboard how do I get the Form filter cleared out
automatically?

Thanks.
Iram/mcp
 
A

Allen Browne

Access may retain the last filter you used in the form's Filter property,
but just ignore it. To turn the filter off (i.e. show all records again),
just use:
Me.FilterOn = False
 
G

Guest

Thanks.
Where do I put the code?
Under the Main Form Properties, Event Tab, On Open?

Remember I have a combobox on my switchboard that opens my "Main" form using
the filter. I need to clear the filter after the Main form opens so that I
can use a combobox search field on the Main Form.

Thanks.
Iram/mcp







Allen Browne said:
Access may retain the last filter you used in the form's Filter property,
but just ignore it. To turn the filter off (i.e. show all records again),
just use:
Me.FilterOn = False

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Iram said:
Hello.
I have a switchboard with a text box and a button that finds what ever I
put
in the text box on a different form (I used the wizard for that). In the
other form I have created a ComboBox with the wizard but now when I use
that
combo box to search for other records that I want to appear on the same
for
it doesn't. I noticed that in the Form properties there was some
information
like [Task ID]='CM041' in the Filter properties. When I removed [Task
ID]='CM041' and went back into the form view I was able to menuever
through
my records using the combo box on the form. After initially opening the
form
through the switchboard how do I get the Form filter cleared out
automatically?

Thanks.
Iram/mcp
 
A

Allen Browne

If you want the filter applied initially, and then you want to be able to
remove it, you could add a command button to your form.

(Of course, you could also do this by releasing the Filter button in the
toolbar without needing to write any code.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Iram said:
Thanks.
Where do I put the code?
Under the Main Form Properties, Event Tab, On Open?

Remember I have a combobox on my switchboard that opens my "Main" form
using
the filter. I need to clear the filter after the Main form opens so that I
can use a combobox search field on the Main Form.

Thanks.
Iram/mcp


Allen Browne said:
Access may retain the last filter you used in the form's Filter property,
but just ignore it. To turn the filter off (i.e. show all records again),
just use:
Me.FilterOn = False

Iram said:
Hello.
I have a switchboard with a text box and a button that finds what ever
I
put
in the text box on a different form (I used the wizard for that). In
the
other form I have created a ComboBox with the wizard but now when I use
that
combo box to search for other records that I want to appear on the same
for
it doesn't. I noticed that in the Form properties there was some
information
like [Task ID]='CM041' in the Filter properties. When I removed [Task
ID]='CM041' and went back into the form view I was able to menuever
through
my records using the combo box on the form. After initially opening the
form
through the switchboard how do I get the Form filter cleared out
automatically?

Thanks.
Iram/mcp
 
G

Guest

Actually I would like to automate this instead of having folks click on a
Button that would run the code.


Iram/mcp

Allen Browne said:
If you want the filter applied initially, and then you want to be able to
remove it, you could add a command button to your form.

(Of course, you could also do this by releasing the Filter button in the
toolbar without needing to write any code.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Iram said:
Thanks.
Where do I put the code?
Under the Main Form Properties, Event Tab, On Open?

Remember I have a combobox on my switchboard that opens my "Main" form
using
the filter. I need to clear the filter after the Main form opens so that I
can use a combobox search field on the Main Form.

Thanks.
Iram/mcp


Allen Browne said:
Access may retain the last filter you used in the form's Filter property,
but just ignore it. To turn the filter off (i.e. show all records again),
just use:
Me.FilterOn = False

Hello.
I have a switchboard with a text box and a button that finds what ever
I
put
in the text box on a different form (I used the wizard for that). In
the
other form I have created a ComboBox with the wizard but now when I use
that
combo box to search for other records that I want to appear on the same
for
it doesn't. I noticed that in the Form properties there was some
information
like [Task ID]='CM041' in the Filter properties. When I removed [Task
ID]='CM041' and went back into the form view I was able to menuever
through
my records using the combo box on the form. After initially opening the
form
through the switchboard how do I get the Form filter cleared out
automatically?

Thanks.
Iram/mcp
 
G

Guest

On the same note as you mentioned, how does this sound?

1. Make the Combo Box on the form "not visible"
2. Create a button that clears the form filter i.e. "Me.FilterOn = False"
and makes the Combobox "visible" and make itself "the button" "not visible".

Is this possible if so can you help he with how to do it?

Iram/mcp

Allen Browne said:
If you want the filter applied initially, and then you want to be able to
remove it, you could add a command button to your form.

(Of course, you could also do this by releasing the Filter button in the
toolbar without needing to write any code.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Iram said:
Thanks.
Where do I put the code?
Under the Main Form Properties, Event Tab, On Open?

Remember I have a combobox on my switchboard that opens my "Main" form
using
the filter. I need to clear the filter after the Main form opens so that I
can use a combobox search field on the Main Form.

Thanks.
Iram/mcp


Allen Browne said:
Access may retain the last filter you used in the form's Filter property,
but just ignore it. To turn the filter off (i.e. show all records again),
just use:
Me.FilterOn = False

Hello.
I have a switchboard with a text box and a button that finds what ever
I
put
in the text box on a different form (I used the wizard for that). In
the
other form I have created a ComboBox with the wizard but now when I use
that
combo box to search for other records that I want to appear on the same
for
it doesn't. I noticed that in the Form properties there was some
information
like [Task ID]='CM041' in the Filter properties. When I removed [Task
ID]='CM041' and went back into the form view I was able to menuever
through
my records using the combo box on the form. After initially opening the
form
through the switchboard how do I get the Form filter cleared out
automatically?

Thanks.
Iram/mcp
 
A

Allen Browne

I don't think I understand.

You want the form loaded with a filter.

When someone uses the (unbound?) combo, you want to show all records? If so,
use its AfterUpdate event procedure to set FilterOn to False.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Iram said:
Actually I would like to automate this instead of having folks click on a
Button that would run the code.


Iram/mcp

Allen Browne said:
If you want the filter applied initially, and then you want to be able to
remove it, you could add a command button to your form.

(Of course, you could also do this by releasing the Filter button in the
toolbar without needing to write any code.)

Iram said:
Thanks.
Where do I put the code?
Under the Main Form Properties, Event Tab, On Open?

Remember I have a combobox on my switchboard that opens my "Main" form
using
the filter. I need to clear the filter after the Main form opens so
that I
can use a combobox search field on the Main Form.

Thanks.
Iram/mcp


:

Access may retain the last filter you used in the form's Filter
property,
but just ignore it. To turn the filter off (i.e. show all records
again),
just use:
Me.FilterOn = False

Hello.
I have a switchboard with a text box and a button that finds what
ever
I
put
in the text box on a different form (I used the wizard for that). In
the
other form I have created a ComboBox with the wizard but now when I
use
that
combo box to search for other records that I want to appear on the
same
for
it doesn't. I noticed that in the Form properties there was some
information
like [Task ID]='CM041' in the Filter properties. When I removed
[Task
ID]='CM041' and went back into the form view I was able to menuever
through
my records using the combo box on the form. After initially opening
the
form
through the switchboard how do I get the Form filter cleared out
automatically?

Thanks.
Iram/mcp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top