Dongmei,
does this happen at a client's site in an EXE or in your development environment?
Armin
>I am trying to fix the problem on a FoxPro 7.0 project. This program ran fine before. But now it always be kicked out on the code below.
>
>SELECT con_num ;
>FROM contract ;
>WHERE contract.con_num==THISFORM.CON_NUM1.Value ;
>INTO TABLE C:\x.dbf
>SELE x
>
>DO CASE
>CASE reccount('x') > 0
> answer=MESSAGEBOX("Duplicate contract number found.",64,"Can't save record")
>CASE reccount('x') = 0 SELECT contract recnum=recno()
> REPLACE contract.next_ptr WITH "NULL"
> REPLACE contract.prev_ptr WITH "NULL"
>
> IF THISFORM.Optiongroup2.Value=" "
> THISFORM.Optiongroup2.Value="N/A"
> ENDIF
> IF THISFORM.Combo1.Value=" "
> THISFORM.Combo1.Value="Active"
> ENDIF
> *Reset add/isedit variables
> adding=.F.
> iediting=.F.
> issearching=.F.
> * Run the FoxPro Wizzard Code
> txtbtns.cmdadd::Click
> UNLOCK ALL **this where the problem happened
> THISFORM.Refresh
>ENDCASE && CASE reccount('x')
>
>
>
>When the problem run to "UNLOCK ALL" the whole program is shut down without any error message. I tried to delete the code "UNLOCK ALL". Then the same thing happened when it runs to "THISFORM.Refresh".
>
>Can anybody told me what's wrong on this program?
>
>Any suggestion are welcome!!!
>
>Thanks.
>
>--Dongmei