Jump to content

search button

- - - - -

  • Please log in to reply
No replies to this topic

#1
iswan

iswan

    Newbie

  • Members
  • Pip
  • 5 posts
Hai ,i need advice and help here, In my programme i use 1 button( i name it btnsearch) and 1 textbox(i named it textboxname).The function of this button is use to search data in database and function of textbox is for user fill name.I want to add code which can be use to display an error if the function cannot find the result then it will appear messagebox which it inform that data are not in record.Any idea or advice how i can correct my code. I have create database name login and table name staff.In my table staff i create 7 field such id, Name, tel nu, address, username, password, department. Any advice how i able to correct my code to solve this issue. Here is my
code.I am using visual studio 2005 & sql 2005 as database . Here also i attach my database preview.

Private Sub Search_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsearch.Click

Me.StaffBindingSource.Filter = "NAME = '" & Me.txtsearch.Text & "'"

End Sub




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users