You are on page 1of 2

sele 3

p=reccount()
if p>0
go top
do while .not. eof()
if (cedprof)=alltrim(thisform.text1.value)
m=(codmat)
sele 2
index on codmat to m
seek m
if found()
thisform.list2.additem((codmat)+" "+(nommat))
endif
endif
sele 3
skip+1
enddo
endif
&&&&&&& modificar &&&&&&&&&&&&&&&&&&&&&&&&&&
sele 3
p=reccount()
if p>0
go top
do while .not. eof()
if (cedprof)=alltrim(thisform.text1.value)
delete
pack
endif
skip+1
enddo
endif
for i=1 to thisform.list2.listcount
cod=substr(thisform.list2.list(i),1,3)
sele 3
append blank
repla codmat with cod
repla cedprof with thisform.text1.value
next
&&&&&&& guardar &&&&&&&&&&&&&&&&&&&&&&&&&&
for i=1 to thisform.list2.listcount
cod=substr(thisform.list2.list(i),1,3)
sele 3
append blank
repla codmat with cod
repla cedprof with thisform.text1.value
next

sele 3
p=reccount()
if p>0
go top
do while .not. eof()
if (cedprof)=alltrim(thisform.text1.value)
delete
pack
endif
skip+1
enddo
endif



thisform.list2.removeitem(thisform.list2.listindex)
thisform.command6.enabled=.f.

You might also like