Hiding a column on a form in DS view

T

tsison7

I want to call up a form in DS view with the option of hiding data via an
option group. I set me![controlname].visible = false depending on the option
called and the control disappears in Form view but not in DS view. Any help
is appreciated.
 
L

Linq Adams via AccessMonster.com

In Datasheet View you really can't do much in the way of formatting things
such as visibility using the Properties Box. To make a column disappear in a
Datasheet View, you need to use the ColumnHidden Property:

Private Sub Form_Load()
Me.YourControlName.ColumnHidden = -1
End Sub

To make it visible again you'd use

Me.YourControlName.ColumnHidden = 0
 

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