OS? Progress Version?
Some flavour of Windows I can see. The short answer is you can't easily. The screen freezes because of the way Windows monitors such things. You can try adding a counter to your query and, say, every 100 iterations doing a PROCESS EVENTS. But this can have adverse effects on performance and so on, so test, and use with care. It's also not guaranteed to fix the problem.