DSum does not work

wilhels

New member
Local time
Today, 03:09
Joined
Aug 3, 2004
Messages
7
Good Afternoon!
I am having a problem with DSum on a form.
I am using a sub-form and would like the last column to be a running total.
My 'appropbal' column (field from query) works just fine but if there are 2 entries I would like it to be a running total in a different column.

So far I have: =DSum("[AppropBal]","AppropBalanceQuery")

The criteria is in the query for the 'appropbal' and I am using an unbound text box on the form for the control.

Below is the SQL from the query that made the sub-form:

SELECT Expenditures.ExpenditureID, ProjectInformation.[Campus Name], ProjectInformation.[Project Number], Expenditures.Date, FundingSource.[Funding Source], [FundingSource.Funding Source] & " - " & [TypeProject.TypeProject] AS Source, TypeProject.TypeProject, ProjectInformation.ProjectAppropriation AS [Initial Approp], ProjectInformation.SShareBudget AS [Initial Project Budget], [Additions]+[Interchanges] AS Changes, [ProjectAppropriation]+[Changes] AS [New Approp], [SShareBudget]+[Changes] AS [New Project Budget], Expenditures.Additions, Expenditures.Interchanges, Expenditures.Expenditures, [New Approp]-[New Project Budget] AS AppropBal, [New Project Budget]-[Expenditures] AS ProjectBal
FROM TypeProject INNER JOIN ((FundingSource INNER JOIN Expenditures ON FundingSource.FundingSourceID = Expenditures.FundingSource) INNER JOIN ProjectInformation ON (Expenditures.ProjectNumber = ProjectInformation.[Project Number]) AND (FundingSource.FundingSourceID = ProjectInformation.FundingSource)) ON (TypeProject.ProjectTypeID = ProjectInformation.[Type Project]) AND (TypeProject.ProjectTypeID = Expenditures.TypeProject)
ORDER BY Expenditures.ExpenditureID, [FundingSource.Funding Source] & " - " & [TypeProject.TypeProject];


All the fields except the one I am trying to create w/ DSum are accurate from the query.

Can you help me?

Thank you.

Sue
 
Did anyone get to look at this issue yet? I'm still working on it and have tried every way I know of to switch things around and it still won't work...
Please help!!

Thank You!
 
:cool: Hello wilhels try this:
in subform field properties = (Sum([fieldName]))
 
:) Or the beter way
= (Sum([Project Appropietron] + [Changes])-([SShareBudget] + [Changes]))
 
OK - I tried those and still not working. Some of these items will have more than one entry for activity. I want the subform data sheet to display like a spreadsheet with the total in the far right cell. Currently it's fine with only 1 entry but if there are more than one, i.e. payments, updates, I want the cell to the left to tell the payment/update amount and the one on the far right to display a new total. This new line would be on the bottom. Can this be done? If so, should the dsum be in the query or on the form?

Thank you.
 
Has anyone come up with a solution on this one? I'm still trying but getting no place at all.

Thank you!

;)
 
:p Hello Wilhels!
Send me your mdb, maybe I can do something.
 

Users who are viewing this thread

Back
Top Bottom