Hi everyone.. i don't know how to display NO RECORD FOUND in msgbox..
here is my codes
Private Sub btngo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btngo.Click
open_con()
sqlsearch = "Select *from tblborrower where ID_no=" & txtidno.Text & ""
cmd = New OleDbCommand(sqlsearch, con)
dr = cmd.ExecuteReader
While dr.Read
txtidno.Text = dr("ID_No")
txtname.Text = dr("Borrower_Name")
cbocourse.Text = dr("Course")
txtcontactno.Text = dr("Contact_No")
txtaddress.Text = dr("Address")
End While
dr.Close()
dr = Nothing
cmd = Nothing
sqlsearch = Nothing
con.Close()
End Sub
i don't know where to put the msgbox..
please help me