Greetings,
Well this sure is a simple question and I'm embarrassed I haven't gotten it right yet, but a few minutes of your time will certainly solve my issue. All i need is the following pseudo code translated into actual working VBA code. For each value in a public array(1), I am attempting to loop through all fields(3) within all the subforms(2) on one particular form. If there is a match, the field is visible, if not, the field is hidden (I am using datasheet view).
Dim i as long
1)For each i = 0 to Ubound(PublicArray)
2)For each SUBFORM in PARENTFORM
3)For each CONTROL in SUBFORM
If CONTROL.name = PublicArray(i) Then
CURRENTCONTROL.ColumnHidden = False
Else
CURRENTCONTROL.ColumnHidden = True
End If
Next
Next
Next
Thanks!
Well this sure is a simple question and I'm embarrassed I haven't gotten it right yet, but a few minutes of your time will certainly solve my issue. All i need is the following pseudo code translated into actual working VBA code. For each value in a public array(1), I am attempting to loop through all fields(3) within all the subforms(2) on one particular form. If there is a match, the field is visible, if not, the field is hidden (I am using datasheet view).
Dim i as long
1)For each i = 0 to Ubound(PublicArray)
2)For each SUBFORM in PARENTFORM
3)For each CONTROL in SUBFORM
If CONTROL.name = PublicArray(i) Then
CURRENTCONTROL.ColumnHidden = False
Else
CURRENTCONTROL.ColumnHidden = True
End If
Next
Next
Next
Thanks!