Edson479
|
SÃO PAULO SP - BRASIL
|
|
ENUNCIADA !
|
|
|
Postada em 14/08/2008 17:07 hs
agora eu estou usando assim If rsPaciente.State = 1 Then rsPaciente.Close SQL = "SELECT * FROM fichas where cod_fic= '" & txtCon.Text & "'" rsPaciente.Open SQL, cnSQL, adOpenForwardOnly, adLockOptimistic If RsHistoric.State = 1 Then RsHistoric.Close SQLHis = "SELECT * FROM valores where cod_fic= '" & txtCon.Text & "'" RsHistoric.Open SQLHis, cnSQL, adOpenForwardOnly, adLockOptimistic If (Trim(txtCon.Text) = Empty) = False Then If rsPaciente.EOF Then frmError.F.Cls frmError.F.Print "Não há registros informado" frmError.Show vbModal DoEvents Else lblNom.Caption = rsPaciente.Fields("nom_fic") lblFic.Caption = rsPaciente.Fields("cod_fic") lblLoj.Caption = rsPaciente.Fields("loj_fic") lblEnt.Caption = rsPaciente.Fields("ent_fic") lblPla.Caption = rsPaciente.Fields("pla_fic") lblSer.Caption = rsPaciente.Fields("ser_fic") lblVal.Caption = Format(rsPaciente.Fields("val_fic"), "#,##0.00") txtEnt.Text = Format(Date, "dd/mm/yyyy") End If End If If rsPaciente.State = 1 Then rsPaciente.Close Set rsPaciente = Nothing While Not RsHistoric.EOF Set lst = ListView1.ListItems.Add(, , Format(RsHistoric("dat_fic"), "dd/mm/yyyy")) lst.SubItems(2) = Format(RsHistoric("des_val"), "###,##0.00") Des = Des + Format(RsHistoric("des_val"), "###,##0.00") RsHistoric.MoveNext Wend lblRec.Caption = Format(Des, "###,##0.00") If RsHistoric.State = 1 Then RsHistoric.Close Set RsHistoric = Nothing
|
|
|