search button in vb.net 2005

Hi all I got this code from dremcode only for search button in vb.net.

Page 1 of 1

1 Replies - 4294 Views - Last Post: 15 July 2009 - 08:49 AM Rate Topic: -----

#1 info.shajia@gmail.com  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 17-May 09

search button in vb.net 2005

Post icon  Posted 15 July 2009 - 05:20 AM

If IsNull(TextBox1) Then
	MsgBox "Please Enter the RegistrationNo"
	End If
	
	If IsNull(Me.TextBox1) = False Then
	   
		Me.Recordset.FindFirst "RegistrationNo= '" & Me.TextBox1.Text & "'"
		Me!TextBox1 = Null
		If Me.Recordset.NoMatch Then
			MsgBox "RegistrationNo Not Found", vbOKOnly + vbInformation, "Sorry"
			Me!TextBox1 = Null
		End If
	End If



Hi all I got this code from dremcode only for search button in vb.net.The code is for searching entire sql database if i enter RegistrationNo which is primary key plz help.iam getting errors.

IsNull not declared,Recorset is not member of school.plz help

Is This A Good Question/Topic? 0
  • +

Replies To: search button in vb.net 2005

#2 MajorWalrus  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 115
  • Joined: 22-April 09

Re: search button in vb.net 2005

Posted 15 July 2009 - 08:49 AM

I think this might help.

If Me.TextBox1.Text = "" Then
	
   MsgBox "Please Enter the RegistrationNo"

Else
	
	Me.Recordset.FindFirst "RegistrationNo= '" & Me.TextBox1.Text & "'"
	Me.TextBox1.Text = ""
		
	If Me.Recordset.NoMatch Then
	   MsgBox "RegistrationNo Not Found", vbOKOnly +vbInformation, "Sorry"
	   Me.TextBox1.Text = ""
	End If

End If


Good luck!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1