DECLARE long GetActiveWindow IN WIN32API >hWnd = GetActiveWindow()Thanks Sergey! Now for extra credit, do you know why this app does not seem to have any code to add records to the QuitApp table? I'll email the author, but thought I would give you first crack at it.