June7,

I just wanted to let you know the above code worked for me in a slightly different circumstance. I had a text box on a subform I had been trying to set the focus back to after clicking the command button on the main form. I could never get the focus back to the text box.



Using this Forms!mainformname.subformcontainername.ControlName.SetFocus never worked.
Yours works perfectly.