Alex is correct, if the form or report is still open, but you need to add a
table with a timestamp field that each form and report writes to upon
opening to know which is the last opened, if the last one is closed after it
is opened. Then just query the table for the highest value.
Select TOP 1 MyField From MyTable Order By MyField Desc;