Re: Help for handle "Input Array"
Posted in 1998
Art S. Kagel wrote: > CheungYip San wrote: > > But I don't know how to control the program to stay > > on the last item of program array. Since the cursor > > will move to a new blank row after the user press > > the <Down> or <Enter> key at the last containing > > data row. > > > > This program just only use to modify the existing > > data, I won't want the user to insert any new > > row to the array. > > If memory serves, I believe you want to do a NEXT FIELD to the last > field in the record in a BEFORE INSERT or BEFORE ROW section if the > row is NULL. Do not forget to disable the INSERT key and DELETE keys > so the user cannot insert new rows between others or delete existing > rows in the array. Oh... right... (sound of loose memory chips being banged back into place) As I recall, you'll have to do this in the AFTER ROW clause, not the BEFORE ROW clause. By the time you hit BEFORE ROW, it's too late to keep them on the current row -- they're already in the new row. In the AFTER ROW, test to see if the user was in the last row of the array, and also whether the last keystroke was a DOWN arrow or RETURN. If so, then do a NEXT FIELD <something> to keep them on the same line. June (who hasn't quite lost ALL her marbles yet) -- june_t@hotmail.com Lost in the wilds of Palo Alto, living on Plain M&M's