Results 1 to 11 of 11
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Search box problem (2003)

    I have a combo box on a form to find an item in a list. When I type in a value

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

    Re: Search box problem (2003)

    I don't think the fact that the field is blank in some records has anything to do with the 'not in list' message.

    Could it be that the item in the list is actually <code>'<span style="background-color: #FFFF00; color: #000000; font-weight: bold">2112 </span hi>'</code> or <code>'<span style="background-color: #FFFF00; color: #000000; font-weight: bold"> 2112</span hi>'</code>, i.e. with leading or trailing space(s)?

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Search box problem (2003)

    There do not appear to be any leading or trailing spaces. I do enter this item manually, but I'm the only person who's doing that work.

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Search box problem (2003)

    What if you re-enter the 2112 at table level ?

    You could also try a compact and repair of the db ?
    Francois

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

    Re: Search box problem (2003)

    I don't think we'll be able to solve this without seeing the database. Could you post a stripped down copy of the database? See <post#=401925>post 401925</post#> for instructions.

  6. #6
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Search box problem (2003)

    I've tried both those ideas, Fran

  7. #7
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Search box problem (2003)

    Hans: Here's a copy of the database. Thanks for your help!

  8. #8
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Search box problem (2003)

    It is actually the empty values that cause the error.
    You have 2 solutions :
    Replace all the empty values with 0
    or add a condition in the row source of the combo
    SELECT [tblEdits].[ID], [tblEdits].[Line] FROM tblEdits WHERE ((Not ([tblEdits].[Line]) Is Null)) ORDER BY [tblEdits].[Line];
    Francois

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

    Re: Search box problem (2003)

    In addition to Francois' spot-on reply: there are duplicates in the Line field. I would modify the combo box as follows to get rid of them:

    - Set Column Count to 1.
    - Clear Column Widths.
    - Set Row Source to

    SELECT DISTINCT Line FROM tblEdits WHERE Line Is Not Null

    - Change the line that searches for the record in the After Update procedure to

    rs.FindFirst "[Line] = " & Str(Nz(Me![Combo28], 0))

  10. #10
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Search box problem (2003)

    Thank you, Hans!

  11. #11
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Search box problem (2003)

    Great! Thank you, Fran

Posting Permissions

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