Code Example: Moving to a Different Item on the Form

The following example shows a complete function that will skip ahead two items. If there are not two more items, it will stop on the last item. This function could be installed as an end-field function or installed in one of the data-entry event tables.

skip_2items(dfmp)

DFORMPTR dfmp;

{

    int item_num;

    item_num = min(curitemnum(dfmp) + 2, i_maxnum(dfmp));

    sfm_nextitem(item_num, dfmp);

    return(TRUE);

}


Home Contents Previous Next