What do u mean by forms sql ?
Please clarify for further detail explanation.
debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
You need to read Post #2.
debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
'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)
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
AndreRet,
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.
vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
vb5prgrmr,
You are so right. You know the saying "No Brain No Gain". Exactly what happened here. Did not think it through now did I?
Should have used something like "Me.Hide" etc.
Thanks for pointing this out...
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350