Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    iterate thru comboboxes on a form (Access 2003, XP

    I've done this before, and now have forgotten. basically i want to poll all combos on a form for their current value.

    TIA

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: iterate thru comboboxes on a form (Access 2003, XP

    Something like this:

    Dim ctl As Control
    For Each ctl In Me.Controls
    If ctl.ControlType = acComboBox Then
    ' Do something with the value of the combo box, e.g.
    MsgBox ctl.Value
    End If
    Next ctl

    Instead of Me, you can also use a reference to a specific form:

    For Each ctl In Forms("frmOtherForm").Controls

Posting Permissions

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