I'm not advanced either, and I hope someone who is will help. Meantime....
The syntax of your subform reference is wrong. Should be:
Forms!frmZlecenieMarzena!frmGoraZlecenia!
Form!Nazwa.setfocus
See here:
http://access.mvps.org/access/forms/frm0031.htm
But aside from that, if both those controls must contain values (earlier you only named one you were concerned about), I would test each one separately (separate IF statement for each control). The way you have your code, the focus will be set back to the same control, regardless of which one (or both) is null. I would also put the setfocus code after the msgbox code, just in case the user's dismissal of the msgbox causes an unwanted change in focus.
But beyond all that, I'm not sure it's entirely clear what the issue is. I thought you were saying before that your code
does restore the focus to the nulled control, but that the form itself is visually blocked by the form to which the user was trying to transfer.
Also, note that if your overall code were to force the user to visit the critical controls - you could set the focus to one of them when the form opens, for example, and set the focus to the other in the first ones afterupdate event - then you could use both their afterupdate events for the null check.
Play with the above ideas, but if no help, try to post back with greater clarity. Be sure to say which event contains the code. Hopefully a real expert will post. I suspect the issue is a common one, easily solved, but I don't want to confuse it by posting untested code. Good luck.
-Ron