Here's a pseudo code.
LOCATE FOR BETWEEN(oneitem, begin, end)
DO CASE
CASE NOT FOUND()
CASE begin = end
DELETE
CASE oneitem = begin
REPLACE begin with begin+1
CASE oneitem = end
REPLACE end with end-1
OTHERWISE
lnEnd = end
REPLACE end with oneitem-1
APPEND BLANK
REPLACE begin with oneitem+1, end WITH lnEnd
ENDCASE
>Hello all
>
>could anyone shed some light easy way of doing this.
>
>i have this data in the range table
>
>begin end
>50002 50010
>50015 50019
>50020 50023
>50031 50045
>
>users enter one item 50017 to change. then range table so change to
>
>50002 50010
>50015 50016
>50017 50017
>50018 50019
>50020 50023
>50031 50045
>
>Thanks for any input
--sb--