This code works with the onkey event and ontimer event. This presents a dialog box once to warn there is no activity logged. After the first warning it takes action when the next ontimer event takes place. The dialog can be adjusted on how many cycles it goes through by modifying the "nbr" counter.
The onkey event resets the timer to the current time when key press activity detected. Use the time interval setting on the form properties to determine how often the check for activity is performed.

Variable to be created:

nbr as n
acttime as n

Onkey code:

acttime = toseconds(time())

OnTimer code:

'Date Created: 04-May-2013 02:54:47 PM
'Last Updated: 04-May-2013 05:18:39 PM
'Created By : yagabu
'Updated By : yagabu
'Dialog code copied from someone on A5 Forum

if convert_type(acttime, "n") > toseconds(time()) then
end
else
if nbr < 1 then
nbr = nbr + 1
dim title as c
title = "No Activity Detected"
ui_modeless_dlg_box(title,<<%dlg%
{title=No Activity Detected}
{xmargin=10}
{ymargin=2}
{lf};
<20,2Click Here to continue!MyButton>;
%dlg%,<<%code%
if a_dlg_button="MyButton"
ui_modeless_dlg_close(title)
'Resets time counter
acttime = toseconds(time())
'Any additional code to run with reset
end if
%code%)
else
'Close dialog window
ui_modeless_dlg_close("No Activity Detected")
'Code you wish to execute

end if
end if