I don't see any specific command that I would suspect is incompatible in VFP 5. But there are some things that might be improved; let's say, some inefficiencies.
For example, in the first, loop, after IF FOUND():
There is no need to run the loop, and not even to check IF FOUND() if you set the filter anyway. You can even omit the filter, and combine it with the DELETE statement.
Oh, and one more thing, don't use SELECT 1, better use SELECT 0 to make sure that VFP selects an empty work area.
Thus, this entire block:
>
>select 1
>* USE MSTR EXCL
> use mstr
> LOCATE FOR BILLNO=THISFORM.TEXT1.VALUE .AND. DATEIN=THISFORM.TEXT2.VALUE
>
>IF FOUND()
> DO WHILE .T. .AND. !EOF()
> SET FILTER TO BILLNO=THISFORM.TEXT1.VALUE .AND. DATEIN=THISFORM.TEXT2.VALUE
> DELETE all
> *PACK
>* SKIP
> GO TOP
> IF EOF()
> EXIT
> ENDIF
>
>ENDDO
>ENDIF
can be replaced with:
select 1
use mstr
delete for BILLNO=THISFORM.TEXT1.VALUE .AND. DATEIN=THISFORM.TEXT2.VALUE
If no records match the criteria, simply, no records will be deleted.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)