Código: Selecionar todos
FUNCTION VendaGar
****************
Parameters Vgarson,SomaTira
Area=Select()
Select 4
If NetUse("CadGarso","Garson",.F.,10)
If .Not. File("IndGar1.Ntx")
@ 11,16 Say " Criar Arquivos de Indices......, <Tecle Algo> !"
Set Color To
Inkey(0)
Select &Area
Return(.F.)
Endif
Set Index To IndGar1
Set Order To 1
Go Top
If Lastkey() = 27
Use
Select &Area
Return(.T.)
Endif
Seek Vgarson <=============================== LINHA QUE ESTA DANDO O ERRO
If RegLock(20)
Replace Vendas With Iif(SomaTira=1,Vendas+ValMater,Vendas-ValMater)
Unlock
Else
Mensagem("O registro näo esta disponível....",9,1)
Return
Endif
Use
Select &Area
Return(.T.)
Else
Vrede=.F.
SetColor(Tcor14)
ExpBox(09,13,13,76)
@ 11,16 Say " Acesso Negado, Tente mais tarde. <Tecle Algo> !"
Set Color To
Inkey(0)
Select &Area
Return(.F.)
Endif

