Olá a todos.
Após algumas dificuldades para excluir vários registros mostrados em uma TABLE marcando várias checkbox, compartilho aqui a solução que encontrei.
Espero que ajude quem tem a mesma dificuldade.
Marco os registros que quero excluir e no evento click do botão excluir faço o seguinte.
Obs: Utilizo três tabelas cujos registros são excluidos ao mesmo tempo.
FOR EACH ROW OF TABLE_Teste
Nlinhas is real
Var_Chavex=COL_CODIGO+COL_ANOXXX+COL_SERIES+COL_ALUNOX
HReadSeekFirst(Dbaluno,CODIGOANOXXXSERIESALUNOX,Var_Chavex,hIdentical)
IF HFound(Dbaluno) AND COL_Boxxxx=True THEN
HLockRecNum(Dbaluno,hCurrentRecNum,hLockReadWrite)
HDelete(Dbaluno)
HReadSeekFirst(Boletim,B_CODIGOB_ANOXXXB_SERIEXB_ALUNOX,Var_Chavex,hIdentical)
IF HFound(Boletim) THEN
HLockRecNum(Boletim,hCurrentRecNum,hLockReadWrite)
HDelete(Boletim)
HReadSeekFirst(Financeiro,F_CODIGOF_ANOXXXF_SERIEXF_ALUNOX,Var_Chavex,hIdentical)
IF HFound(Financeiro) THEN
HLockRecNum(Financeiro,hCurrentRecNum,hLockReadWrite)
HDelete(Financeiro)
END
END
END
Nlinhas=TableSelect(TABLE_Teste)
IF Nlinhas=TABLE_Teste THEN
TableDisplay(TABLE_Teste,taCurrentSelection)
Reset()
END
END