Hi friends,
continuously reviewed and tried a lot of examples, but I get an error.
There on the table of sql server, and in the name of customer names, addresses, etc. fields.
From the name of the textbox to enter the name of the auto-complete when I want to I want to enter in alphabetical order.
I'm starting with t ADODC connection. Use the form to add the Connection string properties than in my painting I choose to build. Recordsource leave it blank. ADODC1 choose to add textbox datasource. text1 is change
Table name: Customer
Field: Name
I'm trying vb6.0 & Vb 6.0
Thanks.
continuously reviewed and tried a lot of examples, but I get an error.
There on the table of sql server, and in the name of customer names, addresses, etc. fields.
From the name of the textbox to enter the name of the auto-complete when I want to I want to enter in alphabetical order.
I'm starting with t ADODC connection. Use the form to add the Connection string properties than in my painting I choose to build. Recordsource leave it blank. ADODC1 choose to add textbox datasource. text1 is change
Table name: Customer
Field: Name
Code:
Private Sub Text1_Change()
Form1.Adodc1.RecordSource = "select Name from Customer"
Form1.Adodc1.Refresh
Do Until Form1.Adodc1.Recordset.EOF
j = Len(Text1.Text)
If InStr(1, Mid(Form1.Adodc1.Recordset(0), 1, j), UCase(Text1.Text)) > 0 Then
Text1.Text = Form1.Adodc1.Recordset(0)
Text1.SelStart = j
Text1.SelLength = Len(Text1.Text) - j
End If
Form1.Adodc1.Recordset.MoveNext
Loop
End Sub
I'm trying vb6.0 & Vb 6.0
Thanks.