SOMAR COLUNA DO SGRID
Olá galera. preciso somar a sétima coluna. No SGRID
Private Sub OptiRecebidos_Click()
Dim Juros As Double
Juros = [Ô]8,00[Ô]
Dim Rst As ADODB.Recordset
If OptiRecebidos.Value = True Then
Set Rst = New ADODB.Recordset
Sql = [Ô]Select Id, Docto, Vlr_Parc, Dt_Vencto, Vlr_Juros, Vlr_Multa, Vlr_Recebto, Vlr_Desc, Dt_Recebto From Tbl_Receber Where Dt_Vencto <=[ô][Ô] & Format(LblDataAtual.Caption, [Ô]yyyy/mm/dd[Ô]) & [Ô][ô][Ô]
Rst.Open Sql, Conexao, 3
SGD.Clear
[ô]Carrega Alguns Itens
Do While Not Rst.EOF
With SGD
.HighlightSelectedIcons = False
.RowMode = True
.Redraw = False
.Rows = .Rows + 1
.CellDetails .Rows, 1, Rst!Id, DT_CENTER
.CellDetails .Rows, 2, Rst!Docto, DT_LEFT
.CellDetails .Rows, 3, Format(Rst!Dt_Vencto, [Ô]dd/mm/yyyy[Ô]), DT_CENTER, 1
.CellDetails .Rows, 4, Format(Rst!Vlr_Parc, [Ô]###,##0.00[Ô]), DT_RIGHT
.CellDetails .Rows, 5, Format(Rst!Vlr_Multa, [Ô]###,##0.00[Ô]), DT_RIGHT
.CellDetails .Rows, 6, Format(Rst!Vlr_Desc, [Ô]###,##0.00[Ô]), DT_RIGHT
.CellDetails .Rows, 7, Format(Rst!Vlr_Recebto, [Ô]###,##0.00[Ô]), DT_RIGHT
.CellDetails .Rows, 8, Format(Rst!Dt_Recebto, [Ô]dd/mm/yyyy[Ô]), DT_RIGHT
Rst.MoveNext
.Redraw = True
End With
Loop
End If
Rst.Close
Set Rst = Nothing
End Sub
Private Sub OptiRecebidos_Click()
Dim Juros As Double
Juros = [Ô]8,00[Ô]
Dim Rst As ADODB.Recordset
If OptiRecebidos.Value = True Then
Set Rst = New ADODB.Recordset
Sql = [Ô]Select Id, Docto, Vlr_Parc, Dt_Vencto, Vlr_Juros, Vlr_Multa, Vlr_Recebto, Vlr_Desc, Dt_Recebto From Tbl_Receber Where Dt_Vencto <=[ô][Ô] & Format(LblDataAtual.Caption, [Ô]yyyy/mm/dd[Ô]) & [Ô][ô][Ô]
Rst.Open Sql, Conexao, 3
SGD.Clear
[ô]Carrega Alguns Itens
Do While Not Rst.EOF
With SGD
.HighlightSelectedIcons = False
.RowMode = True
.Redraw = False
.Rows = .Rows + 1
.CellDetails .Rows, 1, Rst!Id, DT_CENTER
.CellDetails .Rows, 2, Rst!Docto, DT_LEFT
.CellDetails .Rows, 3, Format(Rst!Dt_Vencto, [Ô]dd/mm/yyyy[Ô]), DT_CENTER, 1
.CellDetails .Rows, 4, Format(Rst!Vlr_Parc, [Ô]###,##0.00[Ô]), DT_RIGHT
.CellDetails .Rows, 5, Format(Rst!Vlr_Multa, [Ô]###,##0.00[Ô]), DT_RIGHT
.CellDetails .Rows, 6, Format(Rst!Vlr_Desc, [Ô]###,##0.00[Ô]), DT_RIGHT
.CellDetails .Rows, 7, Format(Rst!Vlr_Recebto, [Ô]###,##0.00[Ô]), DT_RIGHT
.CellDetails .Rows, 8, Format(Rst!Dt_Recebto, [Ô]dd/mm/yyyy[Ô]), DT_RIGHT
Rst.MoveNext
.Redraw = True
End With
Loop
End If
Rst.Close
Set Rst = Nothing
End Sub
alguem....
.Rows = .Rows + 1
.CellDetails .Rows, 1, Rst!Id, DT_CENTER
.CellDetails .Rows, 2, Rst!Docto, DT_LEFT
.CellDetails .Rows, 3, Format(Rst!Dt_Vencto, [Ô]dd/mm/yyyy[Ô]), DT_CENTER, 1
.CellDetails .Rows, 4, Format(Rst!Vlr_Parc, [Ô]###,##0.00[Ô]), DT_RIGHT
.CellDetails .Rows, 5, Format(Rst!Vlr_Multa, [Ô]###,##0.00[Ô]), DT_RIGHT
.CellDetails .Rows, 6, Format(Rst!Vlr_Desc, [Ô]###,##0.00[Ô]), DT_RIGHT
.CellDetails .Rows, 7, Format(Rst!Vlr_Recebto, [Ô]###,##0.00[Ô]), DT_RIGHT
txtValor.Text = CCur(txtValor.Text) + CCur(Rst!Vlr_Recebto)
.CellDetails .Rows, 8, Format(Rst!Dt_Recebto, [Ô]dd/mm/yyyy[Ô]), DT_RIGHT
Rst.MoveNext
.Redraw = True
Lembrando q antes de iniciar o grid vc coloca txtValor.text = [Ô]0[Ô]
.CellDetails .Rows, 1, Rst!Id, DT_CENTER
.CellDetails .Rows, 2, Rst!Docto, DT_LEFT
.CellDetails .Rows, 3, Format(Rst!Dt_Vencto, [Ô]dd/mm/yyyy[Ô]), DT_CENTER, 1
.CellDetails .Rows, 4, Format(Rst!Vlr_Parc, [Ô]###,##0.00[Ô]), DT_RIGHT
.CellDetails .Rows, 5, Format(Rst!Vlr_Multa, [Ô]###,##0.00[Ô]), DT_RIGHT
.CellDetails .Rows, 6, Format(Rst!Vlr_Desc, [Ô]###,##0.00[Ô]), DT_RIGHT
.CellDetails .Rows, 7, Format(Rst!Vlr_Recebto, [Ô]###,##0.00[Ô]), DT_RIGHT
txtValor.Text = CCur(txtValor.Text) + CCur(Rst!Vlr_Recebto)
.CellDetails .Rows, 8, Format(Rst!Dt_Recebto, [Ô]dd/mm/yyyy[Ô]), DT_RIGHT
Rst.MoveNext
.Redraw = True
Lembrando q antes de iniciar o grid vc coloca txtValor.text = [Ô]0[Ô]
Tópico encerrado , respostas não são mais permitidas