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