LParam pcExecCmd Local oCmd oCmd = CreateObject('clstimer') oCmd.DoCmd(pcExecCmd) Release oCmd ENDPROC DEFINE CLASS clstimer AS timer Enabled = .F. Interval = 55 *-- command to execute in the timer event. timercmd = (Space(0)) Name = "clstimer" *-- Indicate completion of the command. cmddone = .F. *-- Set the command, and activate the timer. PROCEDURE docmd LPARAM pctimercmd this.cmddone = .f. this.timercmd = pctimercmd this.enabled = .t. Do While !this.cmddone DoEvents EndDo ENDPROC PROCEDURE Timer this.enabled = .f. Local ccmd ccmd = this.timercmd If vartype(ccmd)='C' .and. !Empty(ccmd) &ccmd Endif this.cmddone = .t. ENDPROC ENDDEFINE