How can i add an autocomplete feature in a textbox? As soon as i write something in a textbox(whether 1 character or 2 or 3), it should match it with the student name in the database and complete the name.
You could trap the keypress event and make the database call there. If you wanted a minimum of 2 or 3 characters before making the DB call to reduce the number of rows coming back just check the length of the text in the textbox before making the call.
On Key Up event you can get the value from the text box and choose the list of "related or similar" values from DB and then change the value of the textbox with the first value from the result from DB and repeat the above steps for every letter entered.
Here is an Auto Complete code sample for Combo box which is worth checking.
there is no auto complete in a textbox of visual basic 6, then you must to create it from 0, here is a sample of that.
http://www.recursosvisualbasic.com.ar/htm/trucos-codigofuente-visual-basic/6.htm
see ya.
For a hardcore solution, here's a free ComboBox control with autocomplete, implemented from scratch in VB6 from Steve McMahon's excellent vbAccelerator.com.