1,105,585 Community Members

Link from one form to another

Member Avatar
k89mmk
Newbie Poster
2 posts since Sep 2003
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

This seems so simple, so why can't I figure out how to do it?

All I want to do is have two forms, and if you click a button on Form1, Form2 will load (replaying Form1). In a Windows App.

How ????

Thanks for any help.

Member Avatar
big_k105
PFO Founder
349 posts since May 2003
Reputation Points: 11 [?]
Q&As Helped to Solve: 3 [?]
Skill Endorsements: 0 [?]
Team Colleague
 
0
 

well if im understanding what you want all you would have to do is is use the formname.show to show the other form and a me.hide to hide the current forums. so kind of like this

Private Sub cmdbutton1()
   form2.show
   me.hide
End Sub
Member Avatar
Tanuja
Newbie Poster
3 posts since Sep 2007
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

how to link forms sql with vb?????

Member Avatar
debasisdas
Posting Genius
6,542 posts since Feb 2007
Reputation Points: 580 [?]
Q&As Helped to Solve: 476 [?]
Skill Endorsements: 25 [?]
Featured
 
0
 

What do u mean by forms sql ?

Please clarify for further detail explanation.

Member Avatar
WhitePunk
Newbie Poster
11 posts since Oct 2007
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

i tried the code above and its working...
i love it!!!
i lean something from this site... hope i could learn more...
im sure... pretty sure... xD

Member Avatar
mjhd
Newbie Poster
1 post since Aug 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

:-/ :confused: All I want to do is have two forms, and if you click a button on Form1, Form2 will loaded
Any help plz

Member Avatar
KrissyG88
Newbie Poster
1 post since Nov 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I'm making a system and need to link one form to another. meaning- say --> I click login---another form comes up allowing the user to login......how to do dat'?

Member Avatar
debasisdas
Posting Genius
6,542 posts since Feb 2007
Reputation Points: 580 [?]
Q&As Helped to Solve: 476 [?]
Skill Endorsements: 25 [?]
Featured
 
0
 

You need to read Post #2.

Member Avatar
AndreRet
Industrious Poster
4,492 posts since Jan 2008
Reputation Points: 362 [?]
Q&As Helped to Solve: 499 [?]
Skill Endorsements: 24 [?]
 
0
 
'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)
Member Avatar
vb5prgrmr
Posting Virtuoso
1,670 posts since Mar 2009
Reputation Points: 143 [?]
Q&As Helped to Solve: 299 [?]
Skill Endorsements: 3 [?]
 
0
 

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.

Member Avatar
AndreRet
Industrious Poster
4,492 posts since Jan 2008
Reputation Points: 362 [?]
Q&As Helped to Solve: 499 [?]
Skill Endorsements: 24 [?]
 
2
 

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...

Member Avatar
sophiew41
Newbie Poster
1 post since Dec 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

well if im understanding what you want all you would have to do is is use the formname.show to show the other form and a me.hide to hide the current forums. so kind of like this

Private Sub cmdbutton1()
   form2.show
   me.hide
End Sub

You are actually the most amazing person ever THANKYOU!!!!!!!!! you totally just saved my AS-coursework project :)

Member Avatar
pets futu
Newbie Poster
1 post since Dec 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

thank you for the information...i know now how to links form..i got it.

Member Avatar
abelingaw
Posting Whiz in Training
247 posts since Jun 2008
Reputation Points: 69 [?]
Q&As Helped to Solve: 32 [?]
Skill Endorsements: 2 [?]
 
0
 

Poster #3 : Please don't bump threads, start your own.

Please mark thread as solved

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article