Apply Filter to Datasheet

  • Thread starter Thread starter Sierras
  • Start date Start date
S

Sierras

Hi

I'm trying to figure out how to apply a filter to a Yes/No checkbox in
a datasheet so that the user could click it on to apply the filter and
click it off to remove the filter. The datasheet doesn't have a
header for me to put this control.

So any ideas on how to do it?

Thanks..
 
You should use a form for this placing the filter buttons on the form. If
you are using a form in datasheet view then you want to view the forms
header/footer and put the filter buttons there.

Tables are used for storing the data and should not be used for end-users to
view the data.

HTH,
Gina Whipp
 
If you are using a form in datasheet view then you want to view the forms
header/footer and put the filter buttons there.

This is what I am trying to do. But I can not find a way to show the
header/footer in a datasheet view. The header shows up on the design
view and I could place a text box or control there, but then
disappears when the form goes back to datasheet view.

How do I get the header/footer to stay visable in datasheet view?

Thanks..
 
Umm, I think I forogt to say the datasheet view needs to a subform, if the
mainform is datasheet I do not believe there is a way to do this.
 
Well I managed to make it work by creating an unbound form and then
making the datasheet a subform in that main unbound form.
Then I created a couple of buttons on the main form to filter the
subform that goes something like this:

With Me.NameOfSubform.Form
.Filter = "[TheYesNoField] =True"
.FilterOn = True
End With

This works but I still do not understand what is meant by putting the
controls in the header. Even with this arrangement, the datasheet
will not show the header/footer. Am I missing something?
 
One other thing. I have two command buttons to filter the data in the
subform. One to turn it off and the other to turn it off.

This is twhat I've got so far:

This one to turn it on:

With Me.NameOfSubform.Form
.Filter = "[TheYesNoField] =True"
.FilterOn = True
End With

and this one to turn if off:

With Me.NameOfSubform.Form
.Filter = "[TheYesNoField] =True"
.FilterOn = False
End With

Is it possible to do this same thing with just one toggle button?



Well I managed to make it work by creating an unbound form and then
making the datasheet a subform in that main unbound form.
Then I created a couple of buttons on the main form to filter the
subform that goes something like this:

With Me.NameOfSubform.Form
.Filter = "[TheYesNoField] =True"
.FilterOn = True
End With

This works but I still do not understand what is meant by putting the
controls in the header. Even with this arrangement, the datasheet
will not show the header/footer. Am I missing something?


Umm, I think I forogt to say the datasheet view needs to a subform, if the
mainform is datasheet I do not believe there is a way to do this.
 
It might be but I have never done it, I use two buttons.


Sierras said:
One other thing. I have two command buttons to filter the data in the
subform. One to turn it off and the other to turn it off.

This is twhat I've got so far:

This one to turn it on:

With Me.NameOfSubform.Form
.Filter = "[TheYesNoField] =True"
.FilterOn = True
End With

and this one to turn if off:

With Me.NameOfSubform.Form
.Filter = "[TheYesNoField] =True"
.FilterOn = False
End With

Is it possible to do this same thing with just one toggle button?



Well I managed to make it work by creating an unbound form and then
making the datasheet a subform in that main unbound form.
Then I created a couple of buttons on the main form to filter the
subform that goes something like this:

With Me.NameOfSubform.Form
.Filter = "[TheYesNoField] =True"
.FilterOn = True
End With

This works but I still do not understand what is meant by putting the
controls in the header. Even with this arrangement, the datasheet
will not show the header/footer. Am I missing something?


Umm, I think I forogt to say the datasheet view needs to a subform, if
the
mainform is datasheet I do not believe there is a way to do this.

On Sat, 16 Sep 2006 23:39:03 -0400, "Gina Whipp"

If you are using a form in datasheet view then you want to view the
forms
header/footer and put the filter buttons there.

This is what I am trying to do. But I can not find a way to show the
header/footer in a datasheet view. The header shows up on the design
view and I could place a text box or control there, but then
disappears when the form goes back to datasheet view.

How do I get the header/footer to stay visable in datasheet view?

Thanks..
 
Back
Top