Hi,
perhaps this can work:
forms(forms.Count-1).Name

Signature
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
> Is is possible to know which was the last opened form or report ??
>
> Thank you
> Javier
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;

Signature
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
> Is is possible to know which was the last opened form or report ??
>
> Thank you
> Javier
javiernews - 10 Dec 2006 18:04 GMT
Thank You Alex & Arvin !!
I got it !!
Javier