Try changing this pasrt like this:
code:
;--- I want to make sure I am see the right thing
? $doc.frm.ip.value

debug off
? "pause before the loop"
get $

while $status = "0"
? "in loop status = $status "
; Get the valueof the status control ...
$status = $doc.frm.status.value

loop

select
case $status = "1"
? "submit was clicked"
get $x


case $status = "2"
? "Cancel was clicked"
goto Finish


case 1
endselect

;--------------- finish ----------------

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.