CP_SUBD;("SubDivisoes de "+StrZero(m_CP_DIVISAO,3)+"-"+Alltrim(cp_divis->Desc));sys_tbbrow;05;05;20;78;psq_brow;;
:SKEL
VARIAVEL z_blkdiv:={||z_div:=Val(Left(cp_subdiv,3)),cp_divis->(DbGoto(z_div)),Left(cp_subdiv,3)+'-'+cp_divis->desc}
VARIAVEL z_nil=dbSetFilter({||(M_CP_DIVISAO>0.and.cp_divisao=M_CP_DIVISAO).or.(!empty(m_QbeDIVISAOGet).and. ","+ltrim(str(cp_divisao,3))+","$","+m_QbeDIVISAOGet+",")},"cp_divisao=M_CP_DIVISAO")
VARIAVEL z_nil=DbGoTop()
:TBMT
 13;Qbe_Select("SET", D_OB);Enter-Seleciona ;
 80;tb_pesq(d_ob);P-Pesquisa ;
 22;tb_insert(D_OB);Ins-Inclui ;
 84;tb_locate(D_oB);T-Trecho ;
 76;tb_locate(D_oB);L-Iniciais ;
 67;tb_locate(D_oB);C-Repete_Busca ; 
:TBFI
*;if(Qbe_Select(),"*","");P;X;1;;
Codigo;cp_subdiv;C;99999;5;N;
Descricao;desc;C;@s30; 30;;
Divisao;eval(z_blkdiv);C;@s30; 30;;