Page 1 of 1

Form not updating inside loop

Posted: Wed Aug 05, 2015 11:11 pm
by RussBaker
I am trying to display a status via the "main.Text_msg1" value to the user as well as a status bar.
However, inside the do while loop there is no update to the form.
Is there some kind of refresh that needs to take place inside the loop?

Code: Select all

Func CHKEM()
   local p:=10
   local c:=0
   local t:=0
   main.Text_msg1.visible :=.t.
   main.Text_msg1.value :="Verifying..."
     
   set filter to type="E" .and. status < "7" 
   go top

   do while !eof()

      p++
      If P>1000
        p=0
      Endif
      main.progressbar_1.value := p
      c++
      t=t+amount
      skip
   Enddo
   main.progressbar_1.visible := .f.
   main.Text_msg1.visible := .f.
   main.Text_msg1.value :=""
   msgbox({"Unpaid  due between "+dtoc(main.datepicker_1.value) + " and " + dtoc(main.datepicker_2.value) +chr(13)+ "Total Bills "+ str(c)+ chr(13) + "Total Amount   "+ transform(t,"$99,999.99")}, "Verify" ) 
Return

Re: Form not updating inside loop

Posted: Wed Aug 05, 2015 11:34 pm
by srvet_claudio
Hi RussBaker,
Insert at inside of loop:

DO EVENTS