Results 1 to 4 of 4
  1. #1
    dwheatley is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2017
    Posts
    22

    Query Criteria of <=x not working

    Hi,



    I have a text box on a form (format is 'General Number' in the property sheet). I want the query that I run to only show results which are equal to or less than this number.

    In my query I therefore have [Forms]![SearchF]![Price] < = "x" in the criteria. However, when I run the query, it doesn't take the number entered into the form into account.

    I have attached a screenshot of my query design.

    Any help?
    Attached Thumbnails Attached Thumbnails AccessHelp.PNG  

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    you cant use string 'x'
    you want numbers .

    field: [Price]
    criteria:<=forms!searchF!Price

  3. #3
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    'x' is text so you cannot compare.

    think you need

    <=Forms!Search!Price

    as a criteria of your price column instead of

    >="x"

    as a criteria in your Forms!Search!Price column

  4. #4
    dwheatley is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2017
    Posts
    22
    That's great, thanks for the swift replies both!

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

Similar Threads

  1. Replies: 3
    Last Post: 09-30-2017, 10:55 AM
  2. Query Criteria not working
    By SteveApa in forum Queries
    Replies: 6
    Last Post: 01-16-2015, 03:29 PM
  3. Criteria in query is not working
    By sshel55 in forum Queries
    Replies: 7
    Last Post: 10-17-2013, 04:50 PM
  4. query criteria not working
    By George in forum Access
    Replies: 3
    Last Post: 10-30-2012, 12:14 PM
  5. Multiple Criteria in query not working
    By avarusbrightfyre in forum Queries
    Replies: 3
    Last Post: 04-17-2012, 05:06 PM

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