Private Sub Form_Load()
Dim ctrl As Control
For Each ctrl In Me.Controls
If ctrl.ControlType = acLabel Then
ctrl.OnClick = "=AllClick('" & ctrl.Caption & "')"
End If
Next
End Sub
Function AllClick(FieldName As String)
Dim ctrl As Control
Dim i As Long
For Each ctrl In Me.Controls
If ctrl.Name = FieldName Then
ctrl.SetFocus
Me.Form.SelTop = 1
Me.Form.SelHeight = Me.RecordsetClone.RecordCount
Exit For
End If
Next
End Function