Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Apr 2003
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Passing a Value from a Form to a Query (2000)

    Hello everyone --

    I am trying to pass the data in [Forms]![frmBookSearch]![txtISBN] to a query. I have a query set up to list all of the books that match the ISBN that the user puts into the query. However, I need the "Like" criteria in the query. It works fine if, in the frmBookSearch, the user puts in something like:

    10008398*

    It doesn't work so well if the user just puts in:

    10008398

    The query does not come up with any results. however, I don't want my users to have to remember to put the asterisk in all of the time. Any suggestions?

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Passing a Value from a Form to a Query (2000)

    One solution is to always concatenate an asterisk to the value, for example:
    [Forms]![frmBookSearch]!txtISBN] & "*"
    Wendell

  3. #3
    2 Star Lounger
    Join Date
    Apr 2003
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Passing a Value from a Form to a Query (2000)

    Thanks Wendell, that's exactly what I wanted! I thought I was making it harder than it really was...

Posting Permissions

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