filtering check boxes

S

sandrao

I know how to filter a field that is not a check box, I use the simple code
below
Private Sub Label41_Click()
Me.Filter = "[Month] Like 'Jun'"
Me.FilterOn = True
End Sub
However how can I use this code to filter a check box. Check box is either
"Yes" or "No" I tried using Yes, and True but that does not filter.

Any succestion?

Sandrao
 
S

sandrao

I tried this but could not get results.

The check box fields are "Male" and "Female"
Do you have any suggestion of other ways to filter the True statments of
these various fields

Klatuu said:
Try using -1 instead of True
--
Dave Hargis, Microsoft Access MVP


sandrao said:
I know how to filter a field that is not a check box, I use the simple code
below
Private Sub Label41_Click()
Me.Filter = "[Month] Like 'Jun'"
Me.FilterOn = True
End Sub
However how can I use this code to filter a check box. Check box is either
"Yes" or "No" I tried using Yes, and True but that does not filter.

Any succestion?

Sandrao
 
K

Klatuu

If that doesn't work, I don't know why. True and False are intrinsic
constants. True evaluates to -1 and False to 0.
--
Dave Hargis, Microsoft Access MVP


sandrao said:
I tried this but could not get results.

The check box fields are "Male" and "Female"
Do you have any suggestion of other ways to filter the True statments of
these various fields

Klatuu said:
Try using -1 instead of True
--
Dave Hargis, Microsoft Access MVP


sandrao said:
I know how to filter a field that is not a check box, I use the simple code
below
Private Sub Label41_Click()
Me.Filter = "[Month] Like 'Jun'"
Me.FilterOn = True
End Sub
However how can I use this code to filter a check box. Check box is either
"Yes" or "No" I tried using Yes, and True but that does not filter.

Any succestion?

Sandrao
 

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