Results 1 to 2 of 2
  1. #1
    shin_mitsugi is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Posts
    8

    How to Query Design criteria using "greater than/less than"

    So let's say I have a list of purchase orders and I want to create a custom query that will ask me


    "Greater than $X". So that when I enter in $100, only the orders greater than $100 appear in the result.

    What is the expression I must use in the "Criteria" row so that this works? For example, to search by city I would enter [Type a city]. I tried ">$100" but that doesn't work.

    Thank you!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Don't enter $100, enter 100.

    What field has the numbers?

    SELECT * FROM tablename WHERE City=[Type a city] AND Amount>=[Enter number];

    However, I do not recommend popup input prompts in query. Too difficult to validate user input and results in a lot of frustration.

    Use a form to input parameters and reference the controls on form. Review http://www.datapigtechnologies.com/f...tomfilter.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 3
    Last Post: 12-17-2013, 08:27 AM
  2. Replies: 3
    Last Post: 07-16-2013, 02:28 PM
  3. Replies: 4
    Last Post: 03-23-2012, 01:18 PM
  4. Passing criteria "NULL" or "IS NOT NULL" to a query
    By SgtSaunders69 in forum Forms
    Replies: 1
    Last Post: 12-24-2011, 02:22 AM
  5. Query Design to Filter datas "in between"
    By nizam in forum Queries
    Replies: 8
    Last Post: 08-04-2011, 01:26 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