|
Postada em 29/09/2004 15:59 hs
Bom dia , Preciso formatar uma coluna do FLEXGRID tem quer desse jeito 999.999.999,99 Alguém sabe como fazer ? Obrigado Maurício
http://vaza.me/eneiO
|
|
|
|
|
Postada em 29/09/2004 18:03 hs
sp.col=2 'Seta a Coluna que deseja formatar 'Faz um LOOP para formatar todas as linhas For X=1 to GRID.Rows-1 'Começa da linha 1 até o total - 1(precisa colocar o -1 ' pq o Rows conta tb a linha do título) sp.row=X 'Coloca a posicao da linha sp.text=Format(sp.text,"#,###,###,##0.00") 'Formata Next X "O Senhor é meu pastor, late todo dia no quintal!" hahaha religião eh 1 merda!
|
|
|
|
Postada em 29/09/2004 18:27 hs
Private Sub CmdHistorico_Click() Set BancoDeDados = OpenDatabase(App.Path & "horas.MDB", False) Set TBDados = BancoDeDados.OpenRecordset("select Data,ChoraE,ChoraS,DhoraE,DhoraS,Motivo,Saldo from dados where Matricula = '" & Nome.Text & "'AND Data >= #" & Format(DataInicial, "mm/dd/yyyy") & "# and data<= #" & Format(DataFinal, "mm/dd/yyyy") & "# order by data asc,Saldo asc")
If Not TBDados.EOF Then With MSFlexGrid1 .Rows = 1 .Cols = 8 .ColWidth(0) = 500 .ColWidth(1) = 1000 .ColWidth(2) = 700 .ColWidth(3) = 700 .ColWidth(4) = 700 .ColWidth(5) = 700 .ColWidth(6) = 3750 .ColWidth(7) = 2750 .MergeRow(0) = True .TextMatrix(0, 0) = "Linha" .TextMatrix(0, 1) = "Data" .TextMatrix(0, 2) = "Crédito" .TextMatrix(0, 3) = "Crédito" .TextMatrix(0, 4) = "Débito" .TextMatrix(0, 5) = "Débito" .TextMatrix(0, 6) = "Motivo" .TextMatrix(0, 7) = "Saldo" End With I = 1
Do While Not TBDados.EOF With MSFlexGrid1 .Rows = I + 1 .ColAlignment(0) = flexAlignCenterCenter ' alinha coluna .TextMatrix(I, 0) = I - 0 colocar zero para poder começar com 1 .ColAlignment(1) = flexAlignCenterCenter .TextMatrix(I, 1) = Format(TBDados(0), "dd/mmm/yy") .ColAlignment(2) = flexAlignCenterCenter .TextMatrix(I, 2) = IIf(IsNull(TBDados(1)), "----", Format(TBDados(1), "HH:MM")) .ColAlignment(3) = flexAlignCenterCenter .TextMatrix(I, 3) = IIf(IsNull(TBDados(2)), "----", Format(TBDados(2), "HH:MM")) .ColAlignment(4) = flexAlignCenterCenter .TextMatrix(I, 4) = IIf(IsNull(TBDados(3)), "----", Format(TBDados(3), "HH:MM")) .ColAlignment(5) = flexAlignCenterCenter .TextMatrix(I, 5) = IIf(IsNull(TBDados(4)), "----", Format(TBDados(4), "HH:MM")) .ColAlignment(6) = flexAlignCenterCenter .TextMatrix(I, 6) = IIf(IsNull(TBDados(5)), "----", TBDados(5)) .ColAlignment(7) = flexAlignRightCenter .TextMatrix(I, 7) = IIf(IsNull(TBDados(6)), "-----", TBDados(6)) End With I = I + 1 TBDados.MoveNext Loop End If
"O pior inimigo que você poderá encontrar será sempre você mesmo."
|
|
|
|