Test Checkboxes in Subform?

  • Thread starter Thread starter David Habercom
  • Start date Start date
D

David Habercom

I have a subform which shows a list linked to the mainform
record. Some but not all items on the list may have a
checkbox checked (-1). How do I get the main form to
unhide a control if ANY of the boxes is checked? Can I
set a test in the query supporting the subform? Thanks.
 
I have a subform which shows a list linked to the mainform
record. Some but not all items on the list may have a
checkbox checked (-1). How do I get the main form to
unhide a control if ANY of the boxes is checked? Can I
set a test in the query supporting the subform? Thanks.

You could sum the checkboxes. As simple as ...

Me.MyControl.Visible = (Me.sfrmName.Form!chkBox1 + _
Me.sfrmName.Form!chkBox2) <> 0

You might put this in the On Current event of the main form.

- Jim
 
Back
Top