I am having a problem getting a form label to change when the forms timer function is active.
I have a form called 'frmAutoPoll'. When the form opens, its label is green. When the timer interval fires, the code should change the label colour to red and put a new caption in there, BEFORE going off to the called procedure AutoPoll (see attached code). After the function has finished, the timer code (successfully) changes the form label back to green and modifies the caption.
The problem is that while the function AutoPoll fires and runs, the code to change the label to red is being ignored. If I put a break point in at the procedure call to AutoPoll, the label changes to red correctly; likewise, if I put a message box requiring human interaction. The idea is that this form will be active 24/7 unless it is stopped by the user. The idea of the label colour change is just to alert someone where the system is in the cycle should they come and look.
Can anyone advise how I might achieve the label change before the procedure call fires? I have tried putting the initial label change to red inside the called procedure without success, and I have also tried refresh and repaint.