Is there a way to programatically add (and remove) columns to a datasheet that I have in a subform using VBA?
Is there a way to programatically add (and remove) columns to a datasheet that I have in a subform using VBA?
From the Master form
Me.subformName.Form.YourControlName.ColumnWidth = -1
will show the column and
Me.subformName.Form.YourControlName.ColumnWidth = 0
will hide the column.
Change subformName with the name of your subform control and change YourControlName with the column name that you want to Show/Hide
If this helped, please click the star at the bottom left of this posting and add to my reputation. Many thanks.
Bob Fitzpatrick
It's not a question of showing or hiding. I really want to add or delete field controls in the subform the way I ordinarily would in design View.