I have an Access Database with a multi-column list box, and I want to hide certain columns based on if certain checkboxes are checked or not. As it stands, I can use code like
If ChkClient = 0 Then
Me.lstDisplayReport.ColumnWidths = "0; 1 in; 0; 1in ; 1 in; 1in; 1 in"
Else
Me.lstDisplayReport.ColumnWidths = "0; 1in ; 1in ; 1 in; 1 in; 1 in; 1 in"
End If
to hide a single column at a time. The problem is that I can't use this to hide multiple columns at a time, and even having this code for two separate columns causes it to fail. Is there a way to make criteria to hide multiple columns based on checkboxes?
If ChkClient = 0 Then
Me.lstDisplayReport.ColumnWidths = "0; 1 in; 0; 1in ; 1 in; 1in; 1 in"
Else
Me.lstDisplayReport.ColumnWidths = "0; 1in ; 1in ; 1 in; 1 in; 1 in; 1 in"
End If
to hide a single column at a time. The problem is that I can't use this to hide multiple columns at a time, and even having this code for two separate columns causes it to fail. Is there a way to make criteria to hide multiple columns based on checkboxes?