Any help with this would be appreciated
Here's a bit of code i got from this site (ref this thread:http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=55336 ) which hides columns on a subform when there are no values present for a particular filter on the main form. well, all was fine and dandy until i realized IF there happens to be a a value in the column and it's not the first record, the whole column will not appear. I need it to show all columns that have values. I've tried the code below but it's still not looking for through each column. thanks in advance.

Here's a bit of code i got from this site (ref this thread:http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=55336 ) which hides columns on a subform when there are no values present for a particular filter on the main form. well, all was fine and dandy until i realized IF there happens to be a a value in the column and it's not the first record, the whole column will not appear. I need it to show all columns that have values. I've tried the code below but it's still not looking for through each column. thanks in advance.
Code:
Private Sub Form_Current()
On Error Resume Next
Dim ctrl1 As Object
Dim rs As Recordset
Set rs = Me.RecordsetClone
For Each ctrl1 In Me.sfrm_CToolInfo.Form
If ctrl1.ControlType = acTextBox Then
ctrl1.ColumnHidden = True
'If Not rs.BOF And Not rs.EOF Then
rs.MoveFirst
Do Until rs.EOF
If IsNull(ctrl1.Value) Or ctrl1 = "" Then
'ctrl1.ColumnHidden = True
rs.MoveNext
Else
ctrl1.ColumnHidden = False
Exit Do
End If
Loop
'End If
End If
Next ctrl1