D
DJTI via AccessMonster.com
I am stuck on a subform and need help or guidance. If I am going the wrong
direction, someone help aim me in the right direction.
The report needs the MaxDate and the Date previous to the Max date so that
the Client can see the date and balance from the last transaction, the
activity and balance from the current transaction. The query is based on a
subform.
The SQL for the query is below:
SELECT TOP 5 Max(TransLedgersub.DateTransaction) AS MaxOfDateTransaction,
TransLedgersub.InvDetailID, TransLedgersub.InvestmentID, TransLedgersub.
CurShareValue, TransLedgersub.QDivValue, TransLedgersub.QCashPdValue,
TransLedgersub.RedeembyShare, TransLedgersub.TotalShares, TransLedgersub.
CashPdTotal, TransLedgersub.TotalValue, TransLedgersub.DivEarned,
TransLedgersub.RedeemedAmt
FROM TransLedgersub
GROUP BY TransLedgersub.InvDetailID, TransLedgersub.InvestmentID,
TransLedgersub.CurShareValue, TransLedgersub.QDivValue, TransLedgersub.
QCashPdValue, TransLedgersub.RedeembyShare, TransLedgersub.TotalShares,
TransLedgersub.CashPdTotal, TransLedgersub.TotalValue, TransLedgersub.
DivEarned, TransLedgersub.RedeemedAmt
ORDER BY Max(TransLedgersub.DateTransaction) DESC;
Thanks in advance.
Deb
direction, someone help aim me in the right direction.
The report needs the MaxDate and the Date previous to the Max date so that
the Client can see the date and balance from the last transaction, the
activity and balance from the current transaction. The query is based on a
subform.
The SQL for the query is below:
SELECT TOP 5 Max(TransLedgersub.DateTransaction) AS MaxOfDateTransaction,
TransLedgersub.InvDetailID, TransLedgersub.InvestmentID, TransLedgersub.
CurShareValue, TransLedgersub.QDivValue, TransLedgersub.QCashPdValue,
TransLedgersub.RedeembyShare, TransLedgersub.TotalShares, TransLedgersub.
CashPdTotal, TransLedgersub.TotalValue, TransLedgersub.DivEarned,
TransLedgersub.RedeemedAmt
FROM TransLedgersub
GROUP BY TransLedgersub.InvDetailID, TransLedgersub.InvestmentID,
TransLedgersub.CurShareValue, TransLedgersub.QDivValue, TransLedgersub.
QCashPdValue, TransLedgersub.RedeembyShare, TransLedgersub.TotalShares,
TransLedgersub.CashPdTotal, TransLedgersub.TotalValue, TransLedgersub.
DivEarned, TransLedgersub.RedeemedAmt
ORDER BY Max(TransLedgersub.DateTransaction) DESC;
Thanks in advance.
Deb