On Wed, 13 Apr 2011 13:12:23 -0700 (PDT), LC <(E-Mail Removed)> wrote:
>Hi,
>
>The solution above works great for generating the query:
>
>SELECT Product, Region, Amount
>, QueryTotals.TotalAmount
>, Amount/QueryTotals.TotalAmount as PerCentOfCat
>FROM Sales INNER JOIN QueryTotals
>ON Sales.Product = QueryTotals.Product
>
>QueryTotals
>===================
>Product Region Amount TotalAmount PercetOfCat
>Apple North 50 90 =50/90
>Apple South 40 90 =40/90
>Pear North 30 30 =30/30
>Orange East 20 100 =20/100
>Orange West 60 100 =60/100
>Orange South 20 100 =20/100
>
>How can I transfer those results to the table Sales
>-After creating the fields Total and PercentOfCat
Why would you want to?
Storing data which can be calculated from data already in the table wastes
disk, wastes time (almost any calculation will be very fast), and worst, risks
storing invalid data. Adding a single record will throw all your percentages
off. Just store the actual amount, and use a Query when you need to calculate
the totals and percents.
--
John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/For...-US/accessdev/
http://social.answers.microsoft.com/.../en-US/addbuz/
and see also
http://www.utteraccess.com