hi Busbait,
You probably want to be able to show/hide columns on your subform.
To do this you could use a code like this:
- Dim ctl As Control
-
Dim ctlName As String
-
Private Sub Combo5_Enter()
-
Me!Combo5.RowSource = ""
-
For Each ctl In Me!sfTable1.Form.Controls
-
If ctl.ControlType = acTextBox Then
-
Me!Combo5.AddItem ctl.Name
-
End If
-
Next ctl
-
End Sub
-
-
Private Sub btnHide_Click()
-
ctlName = Me!Combo5
-
Set ctl = Me!sfTable1.Form.Controls(ctlName)
-
ctl.ColumnHidden = True
-
End Sub
This is something I just tested and it works great.
I have a comboBox on the main form.
It lists all the columns from your subform.
After you select one from the list, you would click on btnHide to hide the column.
This should get you on th right track.
regards, h.