Help: Interrupt processing & Return - Logic Issue

  • Thread starter Thread starter Pete Beatty
  • Start date Start date
P

Pete Beatty

am trying to produce a system that loops though a file and when an error
is found, it opens another form, displays the errors, allows the operator to
make changes, and then return to continue processing the remaining records.

The basic logic I am using follows.

Form1:
opens the records
while NOT eof
read the record
if errors found
open form 2
endif
wend

Form 2
display the error record
get input from user
close form

The problem exists in Form 1. It continues to read records even though Form
2 is active. I know this is common and need to change the logic. However,
I can determine how to intercept the closing of Form 2 and the signallin
back to Form 1. If I can find the proper event, I can correct the error.
Any thoughts or suggestions would be greatly appreciated.

Thanks
 
Pete Beatty said:
am trying to produce a system that loops though a file and when an error
is found, it opens another form, displays the errors, allows the operator to
make changes, and then return to continue processing the remaining records.

The basic logic I am using follows.

Form1:
opens the records
while NOT eof
read the record
if errors found
open form 2
endif
wend

Form 2
display the error record
get input from user
close form

The problem exists in Form 1. It continues to read records even though Form
2 is active. I know this is common and need to change the logic. However,
I can determine how to intercept the closing of Form 2 and the signallin
back to Form 1. If I can find the proper event, I can correct the error.
Any thoughts or suggestions would be greatly appreciated.

Thanks

You don't need to change the logic, you simply need to open form 2 with
WindowMode := acDialog.

Incidentally, While...Wend is archaic and rarely used. The preferred way to
loop through a recordset is to use Do...Loop e.g.:

Do Until rst.EOF
 
Brian said:
You don't need to change the logic, you simply need to open form 2 with
WindowMode := acDialog.

Incidentally, While...Wend is archaic and rarely used. The preferred way
to
loop through a recordset is to use Do...Loop e.g.:

Do Until rst.EOF
.
.
.
rst.MoveNext
Loop
Thanks. It has been awhile since it programmed at this level. Thanks for
the update on the while/wend
 
Back
Top