Ir ao conteúdo
  • Cadastre-se

Comando vbcrlf não está pulando linha no vb6


Posts recomendados

Boa tarde! Poderiam me ajudar, por favor?

Estou com problemas no código abaixo para pular linha após um select. Acredito que esteja puxando um resultado como texto e não como grade,  mas há a possibilidade de pular linha após cada item? 

 

 

Dim aConnection As New ADODB.Connection
Dim aRecSet As New ADODB.Recordset
Private Sub ADD_Click()
Dim sql As String
sql = "delete from pdv_fiscal where numseqini = '" & txtFilter.Text & "' and pdv = '" & txtPDV.Text & "' and TIPO = 'A' and data = '" & CVDate(txtData.Text) & "'"
End Sub
Private Sub GO_Click()
ShowOut
End Sub
Private Sub Form_Load()
aConnection.Open 'conexão ok
End Sub
Private Sub Form_Unload(Cancel As Integer)
aConnection.Close
End Sub
Sub ShowOut()
Dim i As Long, Out As String
If txtFilter.Text = "" Then
    aRecSet.Open "Select * from tbl_gererica where pdv = 0", aConnection, adOpenKeyset
    MsgBox "Preencha os campos Data, PDV e Sequência", vbInformation, "Erro"
Else
    aRecSet.Open "Select * from tbl_gererica where numseqini = '" & txtFilter.Text & "' and pdv = '" & txtPDV.Text & "' and data = '" & CVDate(txtData.Text) & "'", aConnection, adOpenKeyset
End If
txtOut.Text = ""
For i = 1 To aRecSet.RecordCount
    Out = Out & " Data: " & aRecSet.Fields("Data").Value 
    Out = Out & " Sequência: " & aRecSet.Fields("numseqini").Value 
    Out = Out & " PDV: " & aRecSet.Fields("pdv").Value & vbCrLf
    
    aRecSet.MoveNext
    
Next i
txtOut.Text = Out
aRecSet.Close
End Sub


 

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novas respostas.

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...