: Private Sub cmdPrint_Click() Dim lpItem As ListItem, lpSubItem As ListSubItem, lpLine As String Dim Conn As New Connection Dim rs As Recordset Dim strSQL As String
Conn.Open \"Driver={Microsoft Access Driver (*.mdb)};DBQ=\" & App.Path & \"\\db1.mdb\" strSQL = \"SELECT * FROM kv\" Set rs = Conn.Execute(strSQL)
For Each lpItem In ListView1.ListItems lpLine = vbNullString For Each lpSubItem In lpItem.ListSubItems lpLine = lpLine & lpSubItem.Text & vbCrLf Next If Not lpLine = vbNullString Then lpLine = Left(lpLine, Len(lpLine) - 1) Printer.Print lpLine Next End Sub
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.