Question : Toggle Buttons!!!

I have a form with two toggle buttons...

on this form, there are certain records that have checks beside them.  I would like to be able to use the toggle buttons as preset filters but I can't seem to get it to work properly...  anyone familiar with coding toggle buttons to filter specific data?

Answer : Toggle Buttons!!!

Add the following Subroutine to the form:

Private Sub SetFilter()

 If Me![tgl1] = False and Me![tgl2] = False then
   Me.FilterOn = False
 ElseIf Me![tgl1] = True and Me![tgl2] = True then
   Me.Filter = " = True AND = True"
   Me.FilterOn = True
 ElseIf Me![tgl1] = True then
   Me.Filter = " = True"
   Me.FilterOn = True
 Else
   Me.Filter = = True"
   Me.FilterOn = True
 End If

 I believe is what your asking for.

Jim.
 
 

Random Solutions  
 
programming4us programming4us