You could try using Screen.PreviousControl instead of
Me.ActiveControl
OTOH, I sometimes use the DoubleClick event on individual
controls instead of a separate button. There's slightly
less UI clutter and it doesn't move the focus.
--
Marsh
MVP [MS Access]
Only one problem using the ".ActiveControl" is that when I open Form2 I open
it from Form1 by clicking a command button called "cmdAudit", hence, the
command button will always have the focus, therefore I get an error message
saying that It can not find cmdAudit control on Form2 and this is due to the
fact that I do not have this control on Form2. Because of that,
".ActiveControl" is going to be a problem. That is why this is tricky. The
user wants to be working, say, in text boxe on tab "Page3" and when they
click on the cmdAudit button they want Form2 to open on tab Page3 and so on.
Do you think that is possible?
thanks