Results 1 to 4 of 4
  1. #1
    Mschneider331 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    6

    Logical Functions in queries

    I need do create a query that will display:
    Company Name
    Invoice Number
    and a message the will say "check for volume discount" if the quantity orders is at least 5, and they are not getting a discount percent.

    I know how to create the query just don't know how to create the message.
    Click image for larger version. 

Name:	Capture.PNG 
Views:	11 
Size:	15.1 KB 
ID:	26298

  2. #2
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,353
    Add a calculated field to your query and put criteria on it that satisfies your limit for the message, along with whatever other limits there are (perhaps such as 'where discountpercent <> Null')
    Message: IIf([qty]> 5,"check for discount","")
    Last edited by Micron; 10-31-2016 at 05:41 PM. Reason: clarification
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Mschneider331 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    6
    Thank you. I figured it out, but now I need it to only display the ones that didn't get a discount. I tried typing in 0 in the criteria but it doesn't work. This is what the discount field looks like when its 0 discounts even though they purchased 5 or more items.Click image for larger version. 

Name:	Capture.PNG 
Views:	11 
Size:	1.3 KB 
ID:	26299

  4. #4
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,353
    You'll have to post more info than that. Try to imagine me trying to solve this with what you are showing; no sql statement, no image of the query design - only a relationships picture and a snippet of results that isn't what you want.

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

Similar Threads

  1. Logical Functions in Queries
    By Mschneider331 in forum Access
    Replies: 5
    Last Post: 10-31-2016, 09:59 AM
  2. functions / queries
    By merlin2049er in forum Queries
    Replies: 7
    Last Post: 06-10-2015, 09:29 AM
  3. Replies: 5
    Last Post: 06-22-2012, 09:02 AM
  4. User functions within queries...
    By ChaosInACT in forum Queries
    Replies: 5
    Last Post: 01-19-2012, 06:39 PM
  5. Replies: 0
    Last Post: 06-07-2007, 02:33 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