Hi All
My query is very simple.
I have a data file with two fields only in EXCELL.( Fields are Name and Address)
1. Import this file in MSACCESS 2007.
2. Creat a Form in VB2008 Express edition.
3. Fetch the data from database file.
4. How to distribute/install this newly created programme to other computers by using Windows Installation tool.

I wish the form should be such that if first few characters of any name from the Name field of Database file is written in a text box the address for that specific name is displayed in other text box. I require procedure as well as coding for this.

Thanks in advance.

You could use a ComboBox control with the autocomplete items filled with your names. Then, as the users type into the box, a drop down will appear with the possible names. (Make use of the comobox's SelectedValueChanged event.

For example:

Private Sub FillComboBox(ByVal dt As DataTable)
    Try
        'Clear the combobox
        ComboBox1.Items.Clear()

        'Fill the lookup as well
        Dim acSC As New AutoCompleteStringCollection

        If dt.Rows.Count > 0 Then
            For Each dr As DataRow In dt.Rows
                ComboBox1.Items.Add(dr("Name")) 'Place the name of the 'NameColumn' from the database inside the quotes.
                acSC.Add(dr("Name")) 'Same here
            Next

            With ComboBox1
                .AutoCompleteCustomSource = acSC
                .AutoCompleteMode = AutoCompleteMode.SuggestAppend
            End With
        End If
    Catch ex As Exception
        MsgBox(ex.ToString)
    End Try
End Sub
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.