×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

aotocomplete combobox

aotocomplete combobox

aotocomplete combobox

(OP)

i fill a comobox with this code

CODE

Set RS = New ADODB.Recordset
    RS.CursorLocation = adUseClient
    SQL = "SELECT * FROM COMUNI"
    RS.Open Source:=SQL, _
            ActiveConnection:=CON, _
            CursorType:=adOpenForwardOnly, _
            LockType:=adLockReadOnly
    RS.Sort = ("DESCRIZIONE")

    Erase strDBRows()
    strDBRows = RS.GetRows()
    RS.Close
    Set RS = Nothing

    With Me.CCOMNASC
        .Clear
        For I = 0 To UBound(strDBRows, 2)
            .AddItem Trim(strDBRows(0, I)) & "-" & Trim(strDBRows(1, I)) & "-(" & Trim(strDBRows(2, I)) & ")"
      Next I
    End With 

possible to autocomplete Me.CCOMNASC.txt, during the keypress, based the field strDBRows(1, I)?

note:
part of record
CODICE DESCRIZIONE PROVINCIA
401001001 AGLIE' TO
401001002 AIRASCA TO
401001003 ALA DI STURA TO
401001004 ALBIANO D'IVREA TO
401001005 ALICE SUPERIORE TO
401001006 ALMESE TO
401001007 ALPETTE TO
401001008 ALPIGNANO TO
401001009 ANDEZENO TO
401001010 ANDRATE TO
401001011 ANGROGNA TO
401001012 ARIGNANO TO
401001013 AVIGLIANA TO
401001014 AZEGLIO TO
401001015 BAIRO TO
401001016 BALANGERO TO
401001017 BALDISSERO CANAVESE TO
401001018 BALDISSERO TORINESE TO
401001019 BALME TO
401001020 BANCHETTE TO
401001021 BARBANIA TO
401001022 BARDONECCHIA TO

RE: aotocomplete combobox

Sadly VB6 does not have native autocomplete functionality for text controls.

So you pretty much have to write that functionality for yourself from scratch.

If you are not averse to using 3rd party controls, then FreeVBCode have a (quite old now) autocompleting textbox control that might be a good starting point

RE: aotocomplete combobox

(OP)
strongm, is for a web browser...

RE: aotocomplete combobox

No, it isn't. That's just the fully worked example using the control. But the control itself does NOT have to be used for URLs or a browser.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close