Results 1 to 4 of 4
  1. #1
    birbjo is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    4

    Search for an EXACT numeric value on form

    Hi!
    I have a database with several fields. One of these fields holds a numeric value, “amounts”.
    I want to create a search form in Access that gives the user a possibility to search for amounts, as well as for some of the other fields, If several different search-values are needed.
    There’s no problem to search for the other fields on the form. Here I just am using the following query-specification:

    Like “*”& [forms]!(formName]![text93] & “*”

    ...this gives “**” if no values has been chosen on the form, or “*value*” if a value HAS been chosen on the form.
    HOWEVER….
    When I use this on the AMOUNT-field this gives an INCORRECT result….or at least, not the result I want.
    If I, for example, enter the amount “500” in the amount-field on the form, this gives a reply of *500*, thus resulting in a search for ANY value that has the numbers 500 in them….like “28.500” or 425.006……


    How can I specify the query to

    1. Let the user leave the amount-search-field BLANK on the search-form, thus looking for ALL amount-values or
    2. Let the user specify a specific number/amount, thus searching for EXACTLY that amount, and NOT any amount containing that number…?

    I can’t find any solution to this problem by googling…..

    Best regards
    Björn

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    birbjo is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    4
    Worked like magic.......! My weekend is saved! You are my new hero!
    (But wasn't it almost to simple.... :-) ? )
    THX and a VERy GOOD weekend to You!
    Björn

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    LOL! Happy to help, and welcome to the site by the way.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 14
    Last Post: 01-21-2014, 08:19 AM
  2. Just numeric input for all textboxes in the form
    By amd711 in forum Programming
    Replies: 7
    Last Post: 11-27-2012, 08:08 AM
  3. Matching Non exact Cells
    By Shido151 in forum Access
    Replies: 4
    Last Post: 04-03-2012, 12:03 PM
  4. Exact Match Hyperlink
    By JeffG3209 in forum Access
    Replies: 5
    Last Post: 06-23-2011, 07:46 PM
  5. Replies: 3
    Last Post: 02-08-2011, 10:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums