Change recordpointer on open form

Hi, Does anyone know how to update: - in an open tabular type form [Duh!] - all visible records - from a loop on the same form - after modifying from coding the same table as the sourcetable of the form. - it’s not a subform Already tried Currform.Update, Activate etc. My coding (a very basic jobscheduler): REPEAT WITH recJob DO BEGIN RESET; SETCURRENTKEY("entry no."); SETRANGE("in use", TRUE); MODIFYALL(user, USERID); COMMIT; IF FIND('-') THEN REPEAT SELECTLATESTVERSION; IF (JobDate <= TODAY()) THEN BEGIN IF NOT CONFIRM(STRSUBSTNO(Text001, 'Verder gaan', FORMAT("entry no.")), TRUE) THEN BEGIN MODIFYALL(user, ''); COMMIT; EXIT; END; job := 'pass' + FORMAT ("entry no."); MODIFY; CurrForm.ACTIVATE; CurrForm.UPDATE; COMMIT; END; UNTIL NEXT=0; END; UNTIL FALSE;

Your loop looks a kind of weird. It never ends ? I mean beside your “Continue ?” You do not give the form the time to refresh. Try without using a REPEAT/UNTIL and copy your code in a function instead. Call this function from OnOpenForm and from OnTimer trigger. Set the timer interval of teh form to whatever suits you as an update interval for your screen. That should be it. Anyway you should call a “CurrForm.UPDATE(FALSE)” as last statement in your function Function Refresh() WITH recJob DO BEGIN RESET; SETCURRENTKEY(“entry no.”); SETRANGE(“in use”, TRUE); MODIFYALL(user, USERID); COMMIT; IF FIND(’-’) THEN REPEAT SELECTLATESTVERSION; IF (JobDate <= TODAY()) THEN BEGIN job := ‘pass’ + FORMAT (“entry no.”); MODIFY; END; UNTIL NEXT=0; END; COMMIT; CurrForm.UPDATE(FALSE);

Hi Thomas, Thank you for your reply. My coding may seem a little odd, but it’s a simple representation of the problem. In my original coding the CONFIRM is a window with 2 functions: - option to cancel the loop by user - show the user the progression within the loop You left out the part that probably causes the form not to refresh: the CONFIRM shows a dialog that has the focus, so even a “timer” update doesn’t work here. Peter.

What do you need the CONFIRM for ? I mean you can end the loop by closing the form, or even have an option button for switching it on or off.

Thomas, You’ve got a point there. I’ll try this and let you know the outcome: - a main form with my coding and some kind of information for the user of the job in progression - a subform with the actual job records.