I'm sure there are cleaner ways but...
Set the forms timer interval to whatever time from you desire. 5 minutes would be somewhere around 300,000.
In the On Timer event put code to close the form, something like DoCmd.Close.
In each text box, use the Keydown event to reset the timer interval (Me.TimerInterval = 300000).
On every button, use the Click event to reset the timer interval.
The MouseDown event could also be used to reset the timer interval.
Randy