>I am trying to create a screen that would show records that have missing data and need attention from the dispatcher. I want to use 'select' statements to compile this data from a couple of different sources. When the select is complete, I want the grid to update, and then the select reruns. This would go on continually. The problem is that I want the grid to be active while the select statement is running. I can do this if I have 2 seperate programs running, but I don't want to make the user click on 2 seperate icons (that would be stupid). Back in my main frame days we had 'phantom users' that would run in the background. Is there a way to make a program run continuesly, and have a form active at the same time?
>
>Thanks,
>Larry Morelli
A timer was already suggested. If the query takes a minute, the screen will be paused for a minute.
If you can divide the fetching into separate steps - say, a fraction of a second each - you can make user input available, in between the commands, with DoEvents. With VFP 6, this is very slow and requires workarounds. With VFP 7, the speed problem has been solved. My testing reveals that this is possible, but I never did it in actual practice.
Or, perhaps you would be better off running a separate "thread" to fetch the data. Since VFP doesn't support multithreading, this would mean a separate EXE.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)