Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Like lookup from textbox control (2002)

    Hi,

    I have a form with [lstPartNumberLookup]. The user wants to be able to filter the list based on data he enters into [txtPartNumber]. He may not always have the entire part number or the part number may be so long that he only wants to enter the first 10 letters or so. I tried using a like statement in the query bu it didn't work. This is what I have:

    SELECT qryPartNumberLookUp.[Part Number]
    FROM qryPartNumberLookUp
    WHERE (((qryPartNumberLookUp.[Part Number]) Like "forms!frmPartNumberLookup.txtPartnumber.*"))
    ORDER BY qryPartNumberLookUp.[Part Number];

    Is this even possible and if so, What am I missing?

    Thanks,
    Leesha

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Like lookup from textbox control (2002)

    Try this instead:

    WHERE (((qryPartNumberLookUp.[Part Number]) Like forms!frmPartNumberLookup.txtPartnumber & "*"))

    This assumes user will be entering the first part of the PartNumber, rather than enterring a string that can be found anywhere in the Number.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Like lookup from textbox control (2002)

    Thanks! That worked beautifully!

    Leesha

Posting Permissions

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