How to convert ms access data into pdf in vb.net

Posted by user225269 on Stack Overflow See other posts from Stack Overflow or by user225269
Published on 2010-03-09T10:27:05Z Indexed on 2010/05/08 14:08 UTC
Read the original article Hit count: 145

Filed under:
|

I want to convert the ms access data into a document so that the print function in vb.net will read it. Where do I start from here? Here is my form: http://screencast.com/t/MGU4N2UyNmY And here is the code for print preview.

     Try
            PrintPreviewDialog1.ShowDialog()
        Catch es As Exception
            MessageBox.Show(es.Message)
        End Try

How do I incorporate the above code, to the code below so that there is something that can be seen when I hit the print button?

 Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\search.mdb")
        Dim cmd As OleDbCommand = New OleDbCommand("Select * from GH where NAME= '" & TextBox6.Text & "' ", cn)

        cn.Open()

        Dim rdr As OleDbDataReader
        rdr = cmd.ExecuteReader




        If rdr.HasRows Then
            rdr.Read()
            NoAcc = rdr("NAME")
            If (TextBox6.Text = NoAcc) Then TextBox1.Text = rdr("IDNUMBER")
            If (TextBox6.Text = NoAcc) Then TextBox7.Text = rdr("DEPARTMENT")
            If (TextBox6.Text = NoAcc) Then TextBox8.Text = rdr("COURSE")

        End If

Please help,thanks

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about ms-access