I have a finished application except the fine tuning and this is where
you (whoever is reading this) comes in.
I have one form with 3 pages (tabsheets) on it. On each sheet are two
columns of labels and text boxes. I used the same naming convention on
both (Label200, Text200). What I am trying to do is...
if Label200 does not have any text then I want Text200 to go to
a transparent background. the reverse would apply also, if L200 has
text then don't change anything on T200. I have this format of coding
so far, but am stuck. The red in the code is where
I am stuck; please help. Want to get this one off the to-do list.
Function Set_Date_Box()
For Each ctrl In Forms("frm_Checklist").Controls
If ctrl.ControlSource = acTextBox Then
i = ctrl.Name 'gets the textbox name
here is where my problem lies. I think I need to loop thru my labels until I get a name match. once i get the name match check the len of the label and set the properties.
End If
End If
End If
Next ctrl
End Function
you (whoever is reading this) comes in.
I have one form with 3 pages (tabsheets) on it. On each sheet are two
columns of labels and text boxes. I used the same naming convention on
both (Label200, Text200). What I am trying to do is...
if Label200 does not have any text then I want Text200 to go to
a transparent background. the reverse would apply also, if L200 has
text then don't change anything on T200. I have this format of coding
so far, but am stuck. The red in the code is where
I am stuck; please help. Want to get this one off the to-do list.
Function Set_Date_Box()
For Each ctrl In Forms("frm_Checklist").Controls
If ctrl.ControlSource = acTextBox Then
i = ctrl.Name 'gets the textbox name
here is where my problem lies. I think I need to loop thru my labels until I get a name match. once i get the name match check the len of the label and set the properties.
End If
End If
End If
Next ctrl
End Function