access2010
Registered User.
- Local time
- Today, 08:48
- Joined
- Dec 26, 2009
- Messages
- 1,115
Me.Net_Share_Quantity = DSum("[TransactionQuantity]", "Investments_Purchases_SalesT", "Symbol_Stock = '" & Me.Symbol_Stock & "'")
CJ_London
Thank you for your code which is working.
For some reason the data = Net_Share_Quantity = and =Net_Share_Cost = are not being saved into our table to be used in other forms.
Could you please advise me as to what I have done wrong?
Thank you
Paul
essaytee
Thank you for your suggestion, but we are all volunteers at a NGO (Charity) and can not figure out how to create the code which you have suggested.
Would you be kind enough to place Your Code into the data base that we have uploaded.
Thank you.
Crystal
SELECT Investments_Purchases_SalesT.Symbol_Stock, Investments_Purchases_SalesT.TransactionQuantity, Investments_Purchases_SalesT.TransactionPrice, Investments_Purchases_SalesT.TransactionComm, ([TransactionQuantity]*[TransactionPrice])+[TransactionComm] AS LineTotalAmount
FROM Investments_Purchases_SalesT
ORDER BY Investments_Purchases_SalesT.Symbol_Stock;
SELECT qryZ_01_CalculateLineTotals.Symbol_Stock, Sum(qryZ_01_CalculateLineTotals.TransactionQuantity) AS StockQuantity, Sum(qryZ_01_CalculateLineTotals.LineTotalAmount) AS StockTotalPrice
FROM qryZ_01_CalculateLineTotals
GROUP BY qryZ_01_CalculateLineTotals.Symbol_Stock;
SELECT qryZ_02_LineItems.Symbol_Stock, qryZ_02_LineItems.StockQuantity, qryZ_02_LineItems.StockTotalPrice, IIf([StockQuantity]>0,[StockTotalPrice]/[StockQuantity],0) AS NetStockAvgPrice
FROM qryZ_02_LineItems;
essaytee
Thank you for your assistance.
I think that I have done what you have suggested, BUT, no results are appearing.
Could you please advise me as to what I have done wrong, or could you please fix the attached data base so that it will work.
I/We do appreciate your assistance.
Crystal, Thank You
essaytee
Thank you for your note.
Most of the staff in our office are Volunteers and our Director would like to see the, "Net Share Quantity" and "Net Share Cost" on the Main Browse form and on other forms and in reports.
Our difficulty is that EVERY December we receive MANY DIFFERENT EQUITIES as donations and the donors receive tax receipts for their donations. Some of the equities are duplicates and when our organization needs funds we sell some equities.
At this time we would like to have these values visible on different forms and reports.
Any assistance you can provide will be appreciated.
Nicole
Did you check the form, "sat_Investments_Purchases_SalesF" that is a copy of your form, prefixed with "sat_". The ''Net Share Cost' and 'Net Share Quantity' (or Avg Price, can't recall at the moment) are already displayed on your main browser form, they were calculated, that is what I provided above. I don't understand why they need to be copied, copied to where? Where ever that information is required, calculate it.essaytee
Thank you for the link to the article.
We are still trying to understand how to obtain the information that our Director wants, which we are still working on to-day.
===
Could a Update Query as you suggested to Crystal, which works for her problem, be used to copy the "Net Share Quantity" and the "Net Share Cost" onto the Main Browse form and onto other forms and in reports?
Thank you
Nicole
essaytee = 99%
Thank you for your suggestions which work and we have one problem that requires an adjustment.
===
Query Required for Calculation
===
We would like to create a query to find our {Average Share Cost} as the calculation we had been using is not acceptable with our accountant.
We should find the total $ value of all {Bought_$} plus all {DRIP} transactions and then divide their total $ by the number of {Shares Owned}
Thank you,
Crystal
SELECT Investments_Purchases_SalesT.Symbol_Stock, Investments_Purchases_SalesT.TransactionQuantity, Investments_Purchases_SalesT.TransactionPrice, Investments_Purchases_SalesT.TransactionComm, ([TransactionQuantity]*[TransactionPrice])+[TransactionComm] AS LineTotalAmount, Investments_Purchases_SalesT.TransactionType
FROM Investments_Purchases_SalesT
WHERE (((Investments_Purchases_SalesT.TransactionType)="Bought_$")) OR (((Investments_Purchases_SalesT.TransactionType)="Drip"))
ORDER BY Investments_Purchases_SalesT.Symbol_Stock;