I have a list box with four columns: parentID, firstName, lastName and fullName. I am trying to hide the 2nd column (firstName). Right now, the List box is the only control on my form.
I wasn't sure how to get this property to work just by returning to datasheet view, so for now, I put the code under the OnClick event:
Private Sub listBoxParent_Click()
Me.listBoxParent.[firstName].ColumnHidden = True
End Sub
The name of the list box is listBoxParent.
1. Why isn't this working?
2. Do I have to put this code under an event? Is there another way to automatically make the 2nd column hidden when I exit design view and enter datasheet view?