Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SQL Statement (2003)

    I have the following code for a Command Button. However, The list does not display the field "Agent_AgencyName". What am I doing wrong?Thanks for any help!
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    'Set row source for list box
    strSQL = "SELECT DISTINCTROW Agent_AgencyName, SubjectID, SocSecNo "
    strSQL = strSQL & "FROM Agents_Agencies "
    strSQL = strSQL & "ORDER BY " & col & " " & xorder
    Me!lstSearch.RowSource = strSQL
    Me!lstSearch.Requery
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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

    Re: SQL Statement (2003)

    Check the Column Count and Column Widths property of the list box. For example, if the width of the first column has been set to 0, it is effectively hidden (although still present).

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SQL Statement (2003)

    To HansV ... thanks a lot. You are one of the reasons this Lounge is the best!

Posting Permissions

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