Dim ctr As Control
For Each ctr In Me.Controls
If Right(ctr.Name, 2) = "标签" Then
ctr.OnClick = "=orderme('" & Left(ctr.Name, Len(ctr.Name) - 3) & "')"
End If
If (ctr.ControlType = acTextBox) Then
If (Nz(ctr.ControlSource) <> "") Then ctr.OnDblClick = "=filterme('" & ctr.Name & "')"
End If
Next
End Sub
Dim ctr As Control
For Each ctr In Me.Controls
If Right(ctr.Name, 2) = "标签" Then
ctr.OnClick = "=orderme('" & Left(ctr.Name, Len(ctr.Name) - 3) & "')"
End If
If (ctr.ControlType = acTextBox) Then
If (Nz(ctr.ControlSource) <> "") Then ctr.OnDblClick = "=filterme('" & ctr.Name & "')"
End If
Next
End Sub