By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,660 Members | 1,071 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,660 IT Pros & Developers. It's quick & easy.

error in standard MS template. please help

P: n/a
Hello,

Today I fetched the standard Access-2003 template "orders management db"
from
http://office.microsoft.com/en-au/te...CT101426031033

In de openingform one sees a column "extended price"
Perhaps I dont understand this too well, but shouldn't this be something
like quantity*unitprice?

Then why does it say that 15 times $5,- equals $150,- ??

And more important: how do I repair this? (I'm only a rookie, so please when
one has some details for me... ) ;-)

kind regards,

martin
- the netherlands
Feb 9 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Go and open the Northwind database, which is located in the "Samples" folder
under your microsoft office installation, and have a look at the
recordsource for the subform for the orders. In the template you downloaded
they are storing the calculated value and not using a query to calculate the
value on the fly.
Feb 9 '07 #2

P: n/a
Yes, it is a bug. But the bug is in the Microsoft employee who is unable to
multiply. The Extended Price field is manually filled in.

That is also a bug in the employees' ability to do database design. There is
no reason to store the results of a calculation when the computer can easily
recalculate at will. As a matter of good design the form should be based
upon a query, not directly upon the underlying table. Had the designer done
that, the Extended Price calculation could be done as a query column and
would be done correctly instead of allowing a user to make a mistake.

If you decide to fix it by adding a query, the added column should look
like:

Extended Price:
CCur([Quantity]*[UnitPrice]-([Quantity]*[UnitPrice]*[Discount]))

And the query should look like:

SELECT [Order Details].OrderDetailID, [Order Details].ProductID, [Order
Details].Quantity, [Order Details].UnitPrice, [Order Details].Discount,
CCur([Quantity]*[UnitPrice]-([Quantity]*[UnitPrice]*[Discount])) AS
[Extended Price]
FROM [Order Details];

And if you really want to do it properly, you'll want to get rid of the
Lookup Fields and replace it with a lookup table and do a join in the query:

http://www.mvps.org/access/lookupfields.htm
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"martin" <no***@nowhere.orgwrote in message
news:45**********************@news.kpnplanet.nl...
Hello,

Today I fetched the standard Access-2003 template "orders management db"
from
http://office.microsoft.com/en-au/te...CT101426031033

In de openingform one sees a column "extended price"
Perhaps I dont understand this too well, but shouldn't this be something
like quantity*unitprice?

Then why does it say that 15 times $5,- equals $150,- ??

And more important: how do I repair this? (I'm only a rookie, so please
when one has some details for me... ) ;-)

kind regards,

martin
- the netherlands

Feb 9 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.