Multi-Column List Box Column Hiding

Joined
Aug 3, 2012
Messages
1
Reaction score
0
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?
 

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