Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Sep 2007
    Location
    Chatham, Kent, England
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    List Box Selection (2000)

    Hi Loungers, I
    Attached Files Attached Files

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

    Re: List Box Selection (2000)

    The After Update event of CboSite changes the row source of the list box:

    Me.LisDocDetails.RowSource = "SELECT SiteD, OrderNo, SiteLocation, EngineerName FROM " & _

    This makes SiteID into the first (hidden) column of the list box. It should be OrderID:

    Me.LisDocDetails.RowSource = "SELECT OrderID, OrderNo, SiteLocation, EngineerName FROM " & _

  3. #3
    2 Star Lounger
    Join Date
    Sep 2007
    Location
    Chatham, Kent, England
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: List Box Selection (2000)

    Thanks Hans

    As I suspected then!

    I've changed the code to as below. I think it didn't work when I tried this because I changed the SiteID after WHERE too.

    Me.LisDocDetails.RowSource = "SELECT OrderID, OrderNo, SiteLocation, EngineerName FROM " & _
    " QryOrder WHERE SiteID = " & Me.CboSite & " ORDER BY OrderNo"
    Me.LisDocDetails = Me.LisDocDetails.ItemData(0)

    Anyway, whatever, it works ok now. Thanks again.

    Regards

    Graeme

Posting Permissions

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