Consulting

Results 1 to 2 of 2

Thread: How to find only the bound controls?

  1. #1

    How to find only the bound controls?

    How to find only the bound controls in a form?
    I tried using "For each control in form.controls"
    The problem is Labels don't have the controlsource property at all.

  2. #2
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    [VBA]
    For Each ctl In Me.Controls
    ' depends which controls you want to check - may need to add
    ' check boxes and list boxes as well
    Select Case ctl.ControlType
    Case acTextBox, acComboBox
    ' ...
    End Select
    Next ctl

    [/VBA]

    We are what we repeatedly do. Excellence, therefore, is not an act but a habit.
    Aristotle

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •