filtering check boxes

  • Thread starter Thread starter sandrao
  • Start date Start date
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
 
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
 
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
 
Back
Top