Hello students i know you need this codes, so i will provide it to you.. here are the some code's in visual basic 2007/2008... just analyze it!! ^_^

Home » Post Item » Find Form

Find Form

July 21, 2009

Public Class FindForm             click here—>>>  

    Private Sub FindForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ‘TODO: This line of code loads data into the ‘RECORDSDataSet1.BIRTH’ table. You can move, or remove it, as needed.
        Me.BIRTHTableAdapter.Fill(Me.RECORDSDataSet1.BIRTH)

    End Sub

    Private Sub Btnclose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnclose.Click
        Me.Dispose()
    End Sub

    Private Sub Btnselect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnselect.Click
        Form2.fID = Me.DataGridView1.Item(0, Me.DataGridView1.CurrentRow.Index).FormattedValue
        Me.Dispose()
    End Sub

    Private Sub Btnretry_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnretry.Click
        Me.Txtfind.Text = “”
        Me.bindfind.Filter = “LASTNAME LIKE ‘” & Me.Txtfind.Text & “%’ OR FIRSTNAME LIKE ‘” & Me.Txtfind.Text & “%’ “
        Me.Btnselect.Enabled = True
        Me.Btnretry.Enabled = False
        Me.Txtfind.Enabled = True
        Me.DataGridView1.Refresh()
        Me.DataGridView1.CancelEdit()
        Me.BIRTHTableAdapter.Fill(Me.RECORDSDataSet1.BIRTH)
    End Sub

    Private Sub Txtfind_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Txtfind.TextChanged
        Me.bindfind.Filter = “LASTNAME LIKE ‘” & Me.Txtfind.Text & “%’ OR FIRSTNAME LIKE ‘” & Me.Txtfind.Text & “%’ OR MI LIKE ‘” & Me.Txtfind.Text & “%’”
        Me.Btnretry.Enabled = True
    End Sub
End Class

Posted by visualcode at 5:10 pm | permalink

All comments are moderated. Your comments will not appear here unless approved by the blog owner. Thank you.

Add a comment