Results 1 to 8 of 8
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    autocomplete all textboxes base one... (2000 sr-1)

    I have textbox1 for data entry....
    and other 6 textbox tbox1, tbox2...
    In access mdb have index and primary key in filed PROVA (to use for serching)...
    Is possible to autocomplete texbox1 and the related all textbox based recodset of PROVA with tbox2 with rs PROVA1, txbox2 with PROVA2...
    Only a prob, i think, have 1.898.545 records!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: autocomplete all textboxes base one... (2000 sr-1)

    Is this in Access itself, or in VB6 using data from Access?

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: autocomplete all textboxes base one... (2000 s

    sorry...
    VB6 using data from Access

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: autocomplete all textboxes base one... (2000 s

    You could put code in the Change event of the tbox1 text box
    Open a connection to the database (if you haven't already done so)
    Open a recordset RS using an SQL string like this

    "SELECT * FROM [NameOfTable] WHERE PROVA = " & Chr(34 & Me.tbox1 & Chr(34)

    Set tbox2 to RS("PROVA2") etc.
    Close the recordset.

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: autocomplete all textboxes base one... (2000 s

    why error 13 in rs.Open (type nont correspondent)


    Private Sub Form_Load()

    Dim cn As ADODB.Connection
    Dim rs As ADODB.Recordset
    Dim stringa As String

    stringa = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
    stringa = stringa & "e:anagrafica.mdb"

    Set cn = New ADODB.Connection
    Set rs = New ADODB.Recordset

    cn.Open stringa
    rs.Open "SELECT * FROM anagrafica1 WHERE cope =" & Chr(34 & Me.tbox1 & Chr(34))



    End Sub

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: autocomplete all textboxes base one... (2000 s

    What type of field is cope? A text field or a number field?

  7. #7
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: autocomplete all textboxes base one... (2000 s

    solved error 13...
    but to complete the selection 15 minutes!!!!

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: autocomplete all textboxes base one... (2000 s

    I can't help you with that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •