I have a sub-form with a Textbox, combobox, and a hidden Textbox. I am trying to figure out how to hide the combobox if the value in the hidden textbox is 0.
So far, I have tried condotional formatting, however, that only allows you to change the color and Enable property.
I tried finding a way to loop through the controls using code such as below. But the issue is here, is I need the instance of the control, and that I can't find.
Code:
' Dim iType As Integer
'
' For Each ctl In Me!frm_Part_Management_Subform.Controls
' If ctl.Name = "txt_subform_Attribute_Type" Then
' iType = ctl.value
' End If
'
' If ctl.Name = "cmb_Part_Attribute_Value_ListItems" Then
' If iType = 0 Then
' ctl.Visible = False
' Else
' ctl.Visible = True
' End If
' End If
' Next ctl