0

I want to ask some question, which about that" Create a Query which accept two parameters,Restaurant and Category, and display results showing Branch, Category, Description, Date, Quantity, Price and Total Sales, where Total Sales is calculated as Quantity * Price.

How can I do that? Please help me,thanks

2
  • 2
    We'll need to know table structure. Commented Sep 12, 2010 at 19:58
  • Sounds like a homework question to me. Commented Sep 13, 2010 at 16:55

2 Answers 2

2

You might like to read: http://support.microsoft.com/kb/304352

Sign up to request clarification or add additional context in comments.

2 Comments

While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
@infused This is a link to a Microsoft page and the question is dated 2010.
0

A couple of things that are needed to fully answer your qestion:

  • Version of MS Access
  • Table structure

But with that said, the item you are looking for is accessible in the Query By Example (QBE) grid.

Unless you are doing somethign very tricky with the data types, then you can just type the name of your 'variable' in the Where section of the grid in the column of the field that you wish to be applying the criteria to:

[*parameter*]

When you run the query, this will cause a pop up window to display that you can put your parameter into and hey presto - all solved.

As mentioned above, you should also read the KB article referenced. You can also use standard form syntax to link the parameter to a form field.

*formname.fieldname*

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.