View PrivDir()+"GR_0002"
CoEdit "Answer"
Scan
  If ([Ano Referencia]=ANOINI And [Mes Referencia]>=MESINI) Or
     ([Ano Referencia]=ANO    And [Mes Referencia]<=MES)
     Then Moveto PrivDir()+"GR_0002"
          [Mes    ]=MESEXT(NumVal([Answer->Mes Referencia]))
          [Valor 1]=([Answer->Saldo Inicial]+[Answer->Entradas])-[Answer->Saidas  ]
          Down
          Moveto "Answer"
	EndIf
EndScan

Do_It!
