Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to stop the process to execute an action? 2

Status
Not open for further replies.

ejocobip

Programmer
Feb 11, 2005
13
US
Hi,
ok to the point, i have a visual basic application on which i want to open a Sub Form with a button, when the Sub Form is open it will contain a list of data, then i want that the users select some of the items in the list, then execute some other actions with the selected items of the list on the Main Form, but when i load the secundary Form the process does not stop! the users is unable to select the items and the process is executed with a empty list.

in the Main Form i call the Sub Form
Code:
Load FrmSecundary
FrmSecundary.Show

other instructions...

the result is that the Subform shows up, but then the other instructions are executed, it doesn't wait the user to select some items and as i say before the process is executed with a empty list.

does somebody knows a fuction similar to getch() in c++ for visual basic?

Regards,
Patricia
 
I believe that frmsecundary.show vbmodal is what you are looking for. A modal form is one that suspends action in the application until it is closed.

HTH

Bob
 
Try

FrmSecundary.Show vbModal

that will pause execution in the calling form until the sub-form is closed. Don't do the Load FrmSecondary. The .Show method loads the form.
 
If the code is in English you might also want to spelling "secondary" correctly.

Just a suggestion...

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top