Datasheet show and hide columns (1 Viewer)

Laurad

Registered User.
Local time
Today, 18:51
Joined
Jan 16, 2011
Messages
68
I want to be able to show or hide columns in a datasheet (subform) depending on which checkboxes are checked on the main form. I found what looks like the answer I need on this site
http://msdn.microsoft.com/en-us/library/aa217449(v=office.11).aspx
but can't make it work. There is supposed to be a sample database to download, but I think it's all rather old and no longer available as I think they were specifically for Access97 and I'm using Access 2002.

I'm not sure where I am supposed to put the Private Function ShowHideColumn(). I tried putting it in a module and also in the same page as the MainForm code, but when I click on the checkboxes I get a message saying "Microsoft Access can't find the macro "ShowHideColumn()'

I would also like to fix the column widths if that's possible because I want to put some totals underneath the columns, but on the Main Form. If people drag the columns around, then the totals will be meaningless.
 

Users who are viewing this thread

Top Bottom