Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2015
    Posts
    2

    Troubble Understanding Rounding, Classes, and display in Querys

    Hello all! I have been working on a assignment with access and have been giving some instructions that I do not understand. I have attempted to Google the answers, as well as asking a number of my friends, but I cant seem to find anyone who understand what I am todo.



    I was hoping someone on these forums would be able to explain the steps to me in a meaningful way. I greatly appreciate any help!

    The instructions are:
    "Open the rounded prices query in design view. Create a new column to round the retail price of each item to the nearest dollar. name the field RoundedRetail. Create a new column to display luxury for all items that have a rounded value of $100 or more and Everyday for items that are less that $100. Name the field Class. Run the query. Save and close the query."

    The parts of this im having trouble with are as follows:
    1. while naming the field. I type RoundedRetail, but Access then puts in "Expr1: [RoundedRetail]" in the field name.
    2. I'm extremely confused about the criteria i should use. for one im using "Round([Retail])" and for the other "IIf([RoundedRetail]>=100,"Luxury","Everyday")" this however seems to be wrong.

    I have attached a screenshot of the page bellow in case my explanations lead nowhere. I really appreciate any help anyone can offer as I am truly confused as to what they want in this step. Thanks again!

    Click image for larger version. 

Name:	help screenshot.png 
Views:	51 
Size:	69.4 KB 
ID:	20457

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    When I create an alias, as you are being instructed, I type the name in a new field and follow the name with a colon. RoundedRetail:

    If you just type, "RoundedRetail", Access will try to autocorrect and include it within the expression.

  3. #3
    Join Date
    Apr 2015
    Posts
    2
    Thank you! That got the names handled! I wasn't aware of the Alias process and how it worked.

    I am now working on the criteria for the two columns. I have the same criteria as I had before, but cant seem to get my class field to refer to the roundedtable field.
    IIf([RoundedRetail]>=100,"Luxury","Everyday")
    is the criteria im inputting in the class field, however, when I hit "run" i receive a popup asking for the parameter value. anything I enter still seems to be wrong. any ideas as to what im doing wrong here?

    Once again, thank you for helping with this!

    Edit:Finally learned what I was doing wrong. I was working under the impression that Any formulas must be in the criteria section. I didnt realize that the field section can hold formulas as well. putting a formula in the field did the trick! Class: IIf([RoundedRetail]>=100,"Luxury","Everyday")

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Does the Round() function belong in the Criteria field?

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

Similar Threads

  1. Trying not to Schedule Classes around Lunch Time
    By boywonder381 in forum Programming
    Replies: 3
    Last Post: 09-12-2014, 03:43 AM
  2. Classes not taken
    By sdc1234 in forum Queries
    Replies: 1
    Last Post: 02-20-2014, 02:16 PM
  3. Replies: 0
    Last Post: 01-30-2012, 01:14 PM
  4. what does this mean: [classes]![cDate]
    By rankhornjp in forum Programming
    Replies: 6
    Last Post: 11-09-2011, 02:37 PM
  5. Understanding SQL Querys
    By jacobbiljo in forum Access
    Replies: 8
    Last Post: 11-17-2009, 05:17 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