Correction to CTJ #3-3 Designer Forum Article ----------------------------------------------- The Designer Forum article code by Kenneth Weiss in the May/June issue (#3-3, page 21) contains an assumption that the number of records will always be equal to or larger than the scroll rows available. The reliance on the COUNT variable to tell us the maximum value of NDX in the scrolling area is this bad assumption. Accordingly, the [Down_Key], [End_Key], [Tab_Key/Right_Key] and the [Shft_Tab]/[Left_Key] will not work properly when the number of records is less than the number of rows in the scroll area (ie, the COUNT variable). Below is the corrected code. Instead of the COUNT variable, this code uses the value returned by RECORDS(TABLE) to tell us the maximum number of rows actually being used. A corrected copy of DYNAMIC.MDL is included on this month's code disk. OF DOWN_KEY IF NDX = RECORDS(TABLE) DO SET_NEXT DO FILL_NEXT IF FOUND SCROLL(ROW,COL,ROWS,COLS,ROWS(?POINT)) GET(TABLE,RECORDS(TABLE)) DO FILL_SCREEN . ELSE NDX += 1 . OF END_KEY NDX = RECORDS(TABLE) OF TAB_KEY OROF RIGHT_KEY IF NDX < RECORDS(TABLE) THEN NDX += 1. OF SHFT_TAB OROF LEFT_KEY IF NDX = 1 NDX = RECORDS(TABLE) ELSE NDX -= 1 . .