Public Sub Update_Form_Controls(ByRef frm As Form)
Dim controlType As String
Dim controlName As String
'
Dim c As Control
For Each c In frm.Controls
'
controlType = Trim(UCase(TypeName(c)))
controlName = Trim(UCase(c.Name))
'
' Populate variable label names
'
If controlType = "LABEL" Then
If Mid(controlName, 1, 4) = "Line" Then
c.Caption = Trim(gStructClient.ReferToLineNumber)
End If
If Mid(controlName, 1, 3) = "LotBlock_Label" Then
c.Caption = Trim(gStructClient.ReferToLotBlock)
End If
End If
'
Next
End Sub
|