'If Form1 is currently showing on your screen, click the command1 button to load your other form (frmLogin)
frmLogin.Show 1 '1 is vbModal, in other words, the top most form that will have the focus above any other forms.
Unload Me 'Where Me = your first form (Form1)
The code you provided will end the application (if there are only two forms) and I'll tell you why...
When you go Form2.Show vbModal from Form1, code execution stops in Form1 and begins in Form2, because of this, Form1 is now not accessible because Form2 has been shown modal. The only way to have the next line of code execute in form1 is unloading form2 and once you do, Form1 unloads.