Should I do a Timer.Enabled = .F. at the start of the code and a Timer.Enabled = .T. on the way out of my code to start another interval??
Thanks
>Make sure you disable the timer (Timer.Enabled = .F.) when you fire your code.
>
>
>>In the Timer event is
>>
>>ThisForm.PollCells()
>>
>>The PollCells method of the form reads data from a PLC using a DDE interface.
>>
>>I tried the wait wind and it functions as expected so the problem must be in the PollCells method...
>>
>>this is the code in the pollcells method
>>
>>
>>ThisForm.Label25.Caption = "Polling Cell 1A"
>>lcRequest = DDERequest(ThisForm.cChannelOne, 'X0')
>>ThisForm.Label25.Caption = "After DDERequest"
>>IF !EMPTY(lcRequest) AND DDELastError( ) = 0
>> IF lcRequest = "1"
>> ThisForm.shp1A.FillColor = RGB(0,255,0)
>> ELSE
>> ThisForm.shp1A.FillColor = RGB(255,0,0)
>> ENDIF
>>ENDIF
>>
>>... for each cell about 15 with only the addresses different
>>
>>John
>>
>>>>I have a timer on a form. I have set the interval to 30000 then when I enable the timer the code called from the timer method runs constantly. What am I missing?
>>>>
>>>>Thanks
>>>
>>>Show us some code? Like what's in the Timer Event?
>>>
>>>Have you tried a timer that simply does a wait window and then set the interval to 30000 and see if it works?