Click to See Complete Forum and Search --> : Stop process


kku
December 19th, 2008, 01:06 AM
Hi Expertz,
I have a problem that I show a dialog in a form like in a loop like

for i=0 to itotal then

if (codition) then

Dim DlgPas As New DialogPass()
DlgPas.Show()

end if
....
...........
...........


next

i want to stop a process when if condition is true..for example if i=2 and if condition is true then until the user not click OK button on DlgPas Form programe should not go next line ...


Thanx
frm adnanio Brzzzz

dglienna
December 19th, 2008, 01:15 AM
Maybe you need EXIT IF or EXIT FOR which immediately jumps to the respective endpoint

' and also, USE CODE TAGS!!!!

kku
December 24th, 2008, 07:41 AM
No I would not like to exit for or sub...i wish to wait until user click on child form button..
bcoz I need loop index also after geting some data from child form
thanx
waiting ur reply

marceln
December 24th, 2008, 07:46 AM
Then DlgPas should be modal. This way the flow in the parent window will not continue until the dialog closes.

Marraco
December 29th, 2008, 06:59 AM
Then DlgPas should be modal. This way the flow in the parent window will not continue until the dialog closes.It means, write
DlgPas.ShowDialog()