Code: Select all
SELECT (Year([Filled])) AS [Year], (Month([Filled])) AS [Month], Sum(Trades.Dividends) AS Dividend
FROM Trades
GROUP BY (Year([Filled])), (Month([Filled])), Trades.Type
HAVING ((((Year([Filled])))=2024) AND ((Trades.Type)="Dividend"));
Code: Select all
Private Sub Form_Load()
DoCmd.OpenForm "frmOpenPositionsFirst", view:=acFormDS
DoCmd.OpenForm FormName:="frmDividends", view:=acFormDS
DoCmd.OpenForm FormName:="frmDivByMonth", view:=acFormDS
DoCmd.OpenForm FormName:="frmDivByMonth_Previous_Year", view:=acFormDS
DoCmd.SelectObject acTable, , True
DoCmd.Minimize
End Sub
It opens and the first field of the first record is displayed, I guess by default.
So I would like the form to pen displaying the third field in the last record.
what commands would be best to make this happen?