Need help in hiding columns using VBA

ashishprem

Registered User.
Local time
Today, 05:26
Joined
Mar 18, 2008
Messages
35
Hi,

I have a query in Access which return the selected column as per designed in the query window.. If I uncheck the "Show" check box those columns are not displayed in the output. Is there any way that I can do the selection of columns using VBA?

Thanks.
Ashish
 
What are you using to display the data? If it has a 'Column Widths' property, you can use .ColumnWidths = "semicolon;separated;integers;in;twips"
to set your columns. (There are 567 twips in a cm).

Set the widths of the columns you don't want to 0. Eg,

lstBox.ColumnWidths = "0;1134;567;"

to display columns 2 and 3 (at 2cm and 1cm respectively)

hth
mcalex
 
we can use the datagrid to show the columns in tables but hiding column will not directly serve the purpose. Since there is group by clause in the query called, so we need to edit the query dynamically....
 

Users who are viewing this thread

Back
Top Bottom