Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2002
    Posts
    21

    Unanswered: How do I display the first match in a combo box?

    I have two combo boxes - client1 and cbadd1. When a user selects client1 I want the first match to appear in cbadd1. Right now, cbadd1 is blank until the user selects it from the drop down menu. Thanks.

  2. #2
    Join Date
    Jun 2004
    Location
    Saratoga Springs
    Posts
    24
    One solution could be ...

    ---------

    Private Sub client1_AfterUpdate()

    cbadd1 = DLookup("MIN(f2)", "q3", "f1 = " & client1 & "")

    End Sub

    ---------

    where...

    f2 = the value you want displayed in cbadd1

    q3 = some query that contains the data you want displayed in cbadd1 (probably the same as the query you use as the rowsource for cbadd1)

    f1 = another field in q3 that relates client1 to cbadd1


    hope this helps

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Lightbulb

    Try
    YourCombo=yourCombo.Column(0,0)

Posting Permissions

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