Hi forum
I have this code in one frmFind and in this form i have a List view that give me the search result when i click in the list view it pass the id to frmProcess.
the code in listview in frmFind is :
Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)
Dim IdProcesso As String
IdProcesso = Item.Text
frmProcesso.txtfields(0).Text = IdProcesso
End Sub
the code in frmProcess is that receipt the value from frmFind Listview:
Private Sub Form_Load()
On Error GoTo TrataErro
Dim IdProc As String
If PesquisaIsLoaded(frmPesquisa) = True Then
IdProc = ObterProcesso()
End If
Set oRsProc = oCn.LigaProcesso(IdProc)
'If txtfields(0).Enabled = False Then
oRsProc.MoveLast
IdProc = oRsProc.Fields("PK_Processo"
' lblPosicao.Caption = oRs.AbsolutePosition
'End If
Set oRsDocComp = oCn.LigaProcessoDts_Doc_Comprador(IdProc)
Set oRsDocEscrit = oCn.LigaProcessoDts_Doc_Escritura(IdProc)
Set oRsDocFiador = oCn.LigaProcessoDts_Doc_Fiador(IdProc)
Set oRsDocImovel = oCn.LigaProcessoDts_Doc_Imovel(IdProc)
Set oRsDocPosEscrit = oCn.LigaProcessoDts_Doc_Pos_Escrit(IdProc)
Set oRsDocVendedor = oCn.LigaProcessoDts_Doc_Vendedor(IdProc)
Set oRsPedAvalia = oCn.LigaProcessoDts_Pedido_Avalia(IdProc)
Set oRsFechProc = oCn.LigaProcessoEncerra_Proc(IdProc)
Set oRsDocFactura = oCn.LigaProcessoFacturacao(IdProc)
Set oRsProcAquis = oCn.LigaProcessoTrat_proc_aquisicao(IdProc)
Call LigaDBProcObject(oRsProc)
Call LigaDbDocCompObject(oRsDocComp)
Call LigaDbDocEscritObject(oRsDocEscrit)
Call LigaDbDocFiadorObject(oRsDocFiador)
Call LigaDbDocImovelObject(oRsDocImovel)
Call LigaDbDocPosEscritObject(oRsDocPosEscrit)
Call LigaDbDocVendedorObject(oRsDocVendedor)
Call LigaDbPedAvaliaObject(oRsPedAvalia)
Call LigaDbFechProcObject(oRsFechProc)
Call LigaDbDocFacturaObject(oRsDocFactura)
Call LigaDbProcAquisObject(oRsProcAquis)
My question is , how can i pass the value from the frmfind to frmProcess.
i will be gratful,
Best Regards
PJM
I have this code in one frmFind and in this form i have a List view that give me the search result when i click in the list view it pass the id to frmProcess.
the code in listview in frmFind is :
Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)
Dim IdProcesso As String
IdProcesso = Item.Text
frmProcesso.txtfields(0).Text = IdProcesso
End Sub
the code in frmProcess is that receipt the value from frmFind Listview:
Private Sub Form_Load()
On Error GoTo TrataErro
Dim IdProc As String
If PesquisaIsLoaded(frmPesquisa) = True Then
IdProc = ObterProcesso()
End If
Set oRsProc = oCn.LigaProcesso(IdProc)
'If txtfields(0).Enabled = False Then
oRsProc.MoveLast
IdProc = oRsProc.Fields("PK_Processo"
' lblPosicao.Caption = oRs.AbsolutePosition
'End If
Set oRsDocComp = oCn.LigaProcessoDts_Doc_Comprador(IdProc)
Set oRsDocEscrit = oCn.LigaProcessoDts_Doc_Escritura(IdProc)
Set oRsDocFiador = oCn.LigaProcessoDts_Doc_Fiador(IdProc)
Set oRsDocImovel = oCn.LigaProcessoDts_Doc_Imovel(IdProc)
Set oRsDocPosEscrit = oCn.LigaProcessoDts_Doc_Pos_Escrit(IdProc)
Set oRsDocVendedor = oCn.LigaProcessoDts_Doc_Vendedor(IdProc)
Set oRsPedAvalia = oCn.LigaProcessoDts_Pedido_Avalia(IdProc)
Set oRsFechProc = oCn.LigaProcessoEncerra_Proc(IdProc)
Set oRsDocFactura = oCn.LigaProcessoFacturacao(IdProc)
Set oRsProcAquis = oCn.LigaProcessoTrat_proc_aquisicao(IdProc)
Call LigaDBProcObject(oRsProc)
Call LigaDbDocCompObject(oRsDocComp)
Call LigaDbDocEscritObject(oRsDocEscrit)
Call LigaDbDocFiadorObject(oRsDocFiador)
Call LigaDbDocImovelObject(oRsDocImovel)
Call LigaDbDocPosEscritObject(oRsDocPosEscrit)
Call LigaDbDocVendedorObject(oRsDocVendedor)
Call LigaDbPedAvaliaObject(oRsPedAvalia)
Call LigaDbFechProcObject(oRsFechProc)
Call LigaDbDocFacturaObject(oRsDocFactura)
Call LigaDbProcAquisObject(oRsProcAquis)
My question is , how can i pass the value from the frmfind to frmProcess.
i will be gratful,
Best Regards
PJM