DSum in Queries

  • Thread starter Thread starter D
  • Start date Start date
D

D

I have a field in my query: New_Cost:[Allocated_Cost]+[Base]

Need to take the total of that column and divide by each record [New_Cost]
to come up with a percentage in a new field New_Cost_Percentage. Can this be
done with DSum and if so, how?
 
SELECT New_Cost,
New_Cost/DSum("New_Cost", "NameOfYourQuery") AS New_Cost_Percentage
FROM NameOfYourQuery;
 
Thanks Ken -- Works great!! As always, you come through. It is wonderful
having people like you out there in cyber world to help us out.

Ken Snell (MVP) said:
SELECT New_Cost,
New_Cost/DSum("New_Cost", "NameOfYourQuery") AS New_Cost_Percentage
FROM NameOfYourQuery;

--

Ken Snell
<MS ACCESS MVP>


D said:
I have a field in my query: New_Cost:[Allocated_Cost]+[Base]

Need to take the total of that column and divide by each record [New_Cost]
to come up with a percentage in a new field New_Cost_Percentage. Can this
be
done with DSum and if so, how?
 
D said:
Thanks Ken -- Works great!! As always, you come through. It is
wonderful
having people like you out there in cyber world to help us out.

You're very welcome.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

DSum in Query 1
dsum in query 3
DSum 1
dsum - 1
Dsum in Qry for total payments on an account for last 90 days 1
dsum 9
DSum Acting Weird 2
DSum Countrol Source Help 5

Back
Top