Hi New Here,

I am struggling with a project am doing in Visual Basic 2008 where I am intergrating a access 2000 database. I cant seem to use the VB2008 program to search one field from the database (House Numb er, Id like to search btw).

Any help people......

Thanxs

Daz

Public Class MainITL

    Private Sub MainITL_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'Enterprise_DatabaseDataSet._Sub_Contractor_Infomation' table. You can move, or remove it, as needed.
        Me.Sub_Contractor_InfomationTableAdapter.Fill(Me.Enterprise_DatabaseDataSet._Sub_Contractor_Infomation)
        'TODO: This line of code loads data into the 'Enterprise_DatabaseDataSet.Site_Infomation' table. You can move, or remove it, as needed.
        Me.Site_InfomationTableAdapter.Fill(Me.Enterprise_DatabaseDataSet.Site_Infomation)

    End Sub

    Private Sub DataGridView4_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView4.CellContentClick

    End Sub

    Private Sub BTN_E_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_E.Click
        Me.Visible = False
        ITL_Electrician.Visible = True
    End Sub

    Private Sub BTN_J_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_J.Click
        Me.Visible = False
        ITL_Joiner.Visible = True
    End Sub

    Private Sub BTN_P_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_P.Click
        Me.Visible = False
        ITL_Plumber.Visible = True
    End Sub

    Private Sub BTN_B_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_B.Click
        Me.Visible = False
        ITL_Builder.Visible = True
    End Sub

    Private Sub BTN_R_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_R.Click
        Me.Visible = False
        ITL_Refridgation.Visible = True
    End Sub

    Private Sub BTN_HE_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_HE.Click
        Me.Visible = False
        ITL_Heating_Engineer.Visible = True
    End Sub

    Private Sub BTN_GE_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_GE.Click
        Me.Visible = False
        ITL_Gas_Engineer.Visible = True
    End Sub

    Private Sub BTN_EX_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_EX.Click
        Me.Visible = False
        ITL_Extraction.Visible = True
    End Sub
    Private Sub BTN_SEARCH_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_SEARCH.Click
        Dim Notice As String 'Varible'
        Dim Msg As String 'Varible'
        Dim Buttons As Integer 'Varible'
        Dim Title As String 'Varible'
        Dim Number As String 'Varible'
        Dim Number2 As Integer 'Varible'
        Msg = "Enter the house number to look up and press enter." & Chr(13) & Chr(13) & "To cancel this operation press escape."
        Title = "House number Look up" Number = InputBox( Msg, Title)
        If Number <> "" ThenDoCmd.FindRecord Number, acEntire, False, acSearchAll, True, acAll, TrueScreen.ActiveForm![txtItem_Number].SetFocusNumber2 = Screen.ActiveForm![txtItem_Number].TextIf Number <> Number2 
            Then 
            Msg = "The item number you entered was not found." & Chr(13) _& "Please enter another one."
            Title = "Invalid Item Number"
            Buttons = 48
            Notice = MsgBox(Msg, Buttons, Title)
        End If
    End Sub
End Class

Awww come on can someone help me out here... thanxs for someone to moving my thread was unsure where to put in.

Please help me out.

Daz

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.