Not sure how to state this other than by showing an example. I want to create a function that will allow me to send a variable to it to reference a field dynamically.
The [varColumn] is the field that I want to show/hide and I have many fields and only wanted to write the if...then statement once.
Any idea on how to do this?
Thanks,
TwoOdd
--------------
Good judgment comes from experience, and experience comes from bad judgment.
-- Barry LePatner
Code:
If Me.sfm_Factors![varColumn].ColumnHidden = True Then
Me.sfm_Factors![varColumn].ColumnHidden = False
Me.cmdBuilding.Caption = "Hide " & varDesc
Else
Me.sfm_Factors![varColumn].ColumnHidden = True
Me.cmdBuilding.Caption = "Show " & varDesc
End If
The [varColumn] is the field that I want to show/hide and I have many fields and only wanted to write the if...then statement once.
Any idea on how to do this?
Thanks,
TwoOdd
--------------
Good judgment comes from experience, and experience comes from bad judgment.
-- Barry LePatner