Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Columbus, Ohio, USA
    Posts
    286
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combo Boxes (Access 2003)

    Greetings All:

    I have attached a sample Access db in which I am having trouble selecting an item from a combo box and updating another combo box based on the selection. The code is:

    Private Sub Unions_AfterUpdate()
    dim strRowSource as String
    strRowSource = "SELECT DISTINCTROW ID, Articles, UnionID" & _
    " FROM tbl_ContractArcticles " & _
    " WHERE (((UnionID) = " & me.unions & ")) & _
    : ORDER BY ID;"

    me.conart1.rRowSource = strRowSource

    me!Unions.Requery
    me!Conart1.Requery

    End Sub

    As always, any and all suggestions are appreciated. TIA.
    Attached Files Attached Files

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

    Re: Combo Boxes (Access 2003)

    The Unions field in tbl_Grievances_Detail has been defined incorrectly. It should be a number field instead of a text field (otherwise you can't link it to UnionID in tbl_Unions).

    This also means that the row source of the Unions combo box needs the columns to be reversed: first UnionID (width 0), then Union (width > 0)

    See attached version.
    Attached Files Attached Files

  3. #3
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Columbus, Ohio, USA
    Posts
    286
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Boxes (Access 2003)

    Thanks Hans, Works beautifully.

Posting Permissions

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