Link to home
Start Free TrialLog in
Avatar of cookiejar
cookiejarFlag for United States of America

asked on

MS Access 2013 - parameter query and IIf function

I am doing an exercise. I did not get the first problem of the exercise correct and don't understand why.  
On the second problem, I was deducted 3 points and don't understand what am I doing wrong.  
Could you please take and look and tell me what I am doing wrong?

I will attach the database.

These are the problems:

Open the Find Low Quantities query in Design view. Add criteria for the OnHandQty field. The user should be prompted to Enter Threshold. The query should display all results that are less than or equal to the threshold but greater than or equal to 1. Run the query. Enter 2 when prompted to Enter Threshold. You should have one result. Save and close the query.



Open the Overdue Reviews query in Design view. Add a new column to determine if an employee’s performance review is overdue. If the employee’s DateOfLastReview is null, it should display Overdue. If not, it should display nothing. Name the column ReviewStatus. Add criteria of Overdue to the column you just created, so only the employees who are Overdue display. Run the query. Ensure only employees with null DateOfLastReview display. Save and close the query.
exploring-a05-grader-h1-Replace.accdb
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

I'm not sure what you did wrong with the either problem, since both seem to display the expected results - but perhaps it could be dependent on the lesson(s) you were studying at the time. For example, if you are studying the various Domain Aggregate functions but failed to use those in a test, then the instructor may count off for that even if your answer shows the same results. So without more context it'd be difficult to say.

Can you tell us more about the topics you were studying in preparation for this test? That may help us to pinpoint the trouble more easily.
For the first Parameter, ...make sure you entered Less Than Or Equal to, ...(<=)
...Not just Equal to(=)

Then second one is a bit more complex to figure out what you may have done wrong...
So as Scott requested, ...you may have to give us the specifics of what you did.
Avatar of cookiejar

ASKER

This is an on-line class and its automatically graded by a computer.
Problem 1 topic is creating a parameter query.  The instruction in the textbox is to enclose the criteria parameter in [].  The only other example in this topic was Between [Start Date] and [End Date] . I followed these steps:

Open the Find Low Quantities query in Design view. Add criteria for the OnHandQty field. The user should be prompted to Enter Threshold. The query should display all results that are less than or equal to the threshold but greater than or equal to 1. Run the query. Enter 2 when prompted to Enter Threshold. You should have one result. Save and close the query.


Problem 2 topic is  use Round Function and conditional output with IIf function.
I followed these steps for this problem:  Sorry, I inserted the wrong problem in the previous post.

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 RoundedRetail value of $100 or more and Everyday for items that are less than $100. Name the field Class. Run the query. Save and close the query.
The only thing I could see in Problem 2 is that they may have preferred you using the new RoundedRetail field in the IIf expression:
Class: IIf([RoundedRetail]>=100,"Luxury","Everyday")

Ron
I think they want me to use the Between operator in this problem but I don't know how to construct the criteria to yield the correct result.

Problem !: Add criteria for the OnHandQty field. The user should be prompted to Enter Threshold.
The query should display all results that are less than or equal to the threshold but greater than or equal to 1. Run the query. Enter 2 when prompted to Enter Threshold. You should have one result. Save and close the query.
ASKER CERTIFIED SOLUTION
Avatar of IrogSinta
IrogSinta
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial