属性 Sheet Window 我可以在 Access/VBA 中定义标签父级吗?

Where in the Property Sheet Window Can I Define the Label Parent in Access/VBA?

我需要将标签附加到文本框,我想知道在 属性 sheet 中的什么位置我可以做到这一点或如何做到这一点。

我想分享这段用于操作 parent/child 控件的代码:

Private Sub Comando15_Click()
    On Error GoTo Err_Handler
    Dim ctl As Control
    
    For Each ctl In Me.Form.Controls
        With ctl
            If .ControlType = acLabel Then
                If .Parent.Name <> Me.Form.Name Then
                    MsgBox "Controle Pai: " & Chr(13) + Chr(10) & .Parent.Name & Chr(13) + Chr(10) + Chr(10) & _
                        "Controle Filho: " & Chr(13) + Chr(10) & .Name
                End If
            End If
        End With
    Next ctl
    
Exit_Handler:
    Exit Sub
Err_Handler:
    MsgBox Err.Description, vbExclamation, "Error No: " & Err.Number
    Resume Exit_Handler
End Sub

哇!我找到了!要将标签附加到文本框,请在设计视图中打开表单,然后 select 标签和文本框。将出现一个小警告框(带有感叹号和下拉按钮)。只需单击按钮和 select 选项 "attach lable_name to textbox_name"。就这么简单

感谢马克的快速回复。