Click on the Tables/Sets tab in the Control Panel, and right-click on Edit Field Rules.  Click on Events tab, and then select the form name in the Container (upper left).  Click in the Scripts box, and select OnEnterRecord.  Then click on the button in the toolbar Convert to Xbasic.  Now, enter the following in the window:

script_play("increment")