Click here to Skip to main content
15,912,400 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerAutoCompleteStringCollection Pin
AshimD6-Dec-08 3:34
AshimD6-Dec-08 3:34 
Hi There

I have done the Auto Complete Text Box in vb.net
You have to write the code in Form Load Event
Here there is a TextBox named txtVehicle_No
and a Sub named AutoComplete.
call the Sub in form load event
I have fetched data from oracle database

see the code......


Private Sub AutoComplete()
        txtVehicleNo.AutoCompleteSource = AutoCompleteSource.CustomSource
        txtVehicleNo.AutoCompleteMode = AutoCompleteMode.Suggest
        adp = New OracleDataAdapter("select distinct vehicle_no from pil_tripvehicle", CDF.Connection)
        tbl = New DataTable
        adp.Fill(tbl)
        Dim auto As AutoCompleteStringCollection = New AutoCompleteStringCollection()
        For i As Integer = 0 To tbl.Rows.Count - 1
            auto.Add(tbl.Rows(i)(0).ToString)
        Next
        txtVehicleNo.AutoCompleteCustomSource = auto
    End Sub


Ashim Das
QuestionVS 2005 resources Pin
Rafone14-Sep-08 8:38
Rafone14-Sep-08 8:38 
QuestionMaking a function or a sub Pin
Maffyx14-Sep-08 7:34
Maffyx14-Sep-08 7:34 
AnswerRe: Making a function or a sub Pin
Scott Dorman14-Sep-08 7:47
professionalScott Dorman14-Sep-08 7:47 
GeneralRe: Making a function or a sub Pin
Maffyx14-Sep-08 8:16
Maffyx14-Sep-08 8:16 
GeneralRe: Making a function or a sub Pin
Scott Dorman14-Sep-08 8:23
professionalScott Dorman14-Sep-08 8:23 
QuestionGet # of items in recycle bin Pin
jacobjordan13-Sep-08 12:28
jacobjordan13-Sep-08 12:28 
AnswerRe: Get # of items in recycle bin Pin
jzonthemtn13-Sep-08 14:58
jzonthemtn13-Sep-08 14:58 
GeneralRe: Get # of items in recycle bin Pin
jacobjordan13-Sep-08 16:24
jacobjordan13-Sep-08 16:24 
QuestionXML generating problem Pin
pbbhatt12-Sep-08 20:17
pbbhatt12-Sep-08 20:17 
AnswerRe: XML generating problem Pin
Dave Kreskowiak13-Sep-08 5:04
mveDave Kreskowiak13-Sep-08 5:04 
AnswerRe: XML generating problem Pin
Ashfield14-Sep-08 21:07
Ashfield14-Sep-08 21:07 
QuestionPrograaming in Visual Basic.Net Pin
dereck12-Sep-08 19:41
dereck12-Sep-08 19:41 
AnswerRe: Prograaming in Visual Basic.Net Pin
Garth J Lancaster12-Sep-08 19:53
professionalGarth J Lancaster12-Sep-08 19:53 
JokeRe: Prograaming in Visual Basic.Net Pin
Paul Conrad13-Sep-08 5:06
professionalPaul Conrad13-Sep-08 5:06 
GeneralRe: Prograaming in Visual Basic.Net Pin
Garth J Lancaster13-Sep-08 5:22
professionalGarth J Lancaster13-Sep-08 5:22 
GeneralRe: Prograaming in Visual Basic.Net Pin
Paul Conrad13-Sep-08 5:25
professionalPaul Conrad13-Sep-08 5:25 
GeneralGO GARTH! GO GARTH! Pin
leckey13-Sep-08 15:35
leckey13-Sep-08 15:35 
GeneralRe: GO GARTH! GO GARTH! Pin
Garth J Lancaster13-Sep-08 18:04
professionalGarth J Lancaster13-Sep-08 18:04 
AnswerRe: Prograaming in Visual Basic.Net Pin
Dave Kreskowiak13-Sep-08 5:22
mveDave Kreskowiak13-Sep-08 5:22 
QuestionHow to copy a DAT file from one machine to another within a workgroup with using code in vb6 Pin
D.Manivelan12-Sep-08 19:08
D.Manivelan12-Sep-08 19:08 
AnswerRe: How to copy a DAT file from one machine to another within a workgroup with using code in vb6 Pin
Garth J Lancaster12-Sep-08 19:42
professionalGarth J Lancaster12-Sep-08 19:42 
AnswerRe: How to copy a DAT file from one machine to another within a workgroup with using code in vb6 Pin
Dave Kreskowiak13-Sep-08 5:01
mveDave Kreskowiak13-Sep-08 5:01 
QuestionWindows Services Pin
Gagan.2012-Sep-08 17:11
Gagan.2012-Sep-08 17:11 
AnswerRe: Windows Services Pin
Eslam Afifi12-Sep-08 18:27
Eslam Afifi12-Sep-08 18:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.