Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

dbcombo autosearch does not work

I try to use a dbcombo in the same way I did before with a combo box. The dbcombo is connected with an access database an works properly so far. But if I like to search an entry by typing into the edit-field nothing happens (it works very well with a combo box). Is this another MS-bug or are there any parameters I did not set? (I work with VB 5 - Beginners Edition).
Thanks for Answers!  
0
sokrates053098
Asked:
sokrates053098
  • 4
  • 4
1 Solution
 
HelicopterCommented:
Have you set the match entry property to 0-dblBasicMatching?
0
 
sokrates053098Author Commented:
There's no difference in behaviour changing the match entry property. In the database are more then 300 entries (names from a to z). I can type into the edit field whatever I want - the list field does not change - allways shows the first entries of the database. Newertheless, thanks for the hint.

0
 
deightonCommented:
All I can think of is - Is your list case sensitive e.g. your first entry is 'andy' say, because of capitals you might key a Z and find lower case z.

I got a DBCombo to work and search the list in VB4 32-bit.  Here is the text version of my controls - it may help you spot what is missing from yours

Begin VB.Data Data1
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   "D:\AUTO_4\Sortcode.mdb"
      Exclusive       =   0   'False
      Height          =   735
      Left            =   1440
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "SORTCODE"
      Top             =   4800
      Width           =   2535
   End

 Begin MSDBCtls.DBCombo DBCombo1
      Bindings        =   "dbcombo.frx":0716
      DataSource      =   "Data1"
      Height          =   315
      Left            =   120
      TabIndex        =   3
      Top             =   2520
      Width           =   3015
      _Version        =   65536
      _ExtentX        =   5318
      _ExtentY        =   556
      _StockProps     =   77
      ForeColor       =   0
      BackColor       =   16777215
      MatchEntry      =   1
      Style           =   2
      ListField       =   "SCSTCD"
      BoundColumn     =   "SCSTCD"
   End
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
sokrates053098Author Commented:
Thank You deighton, but there's no case sensivity. Here is a list of my Controls (don't mind the syntax, it's just typed from the object window):
DataKunden Data
      BOFAction = 0
      Connect=Access
      DatabaseName=C:\Projekte\Rahmen\Kunden.mdb
      DefaultType=2
      EOFAction=0
      Exclusive=False
      Options=0
      ReadOnly=False
      RecordsetType=0-Table
      RecordSource=Kunden

DBCombo1 DBCombo
      DataBindings=""
      DataField=""
      DataSource=""
      BoundColumn=""
      IntegralHeight=True
      ListField=Name
      RowSource=DataKunden
      Locked=False
      MatchEntry=0
      Enabled=True

0
 
deightonCommented:
I notice you are using a table type recordset (RecordsetType = 0) in the Data - I changed this om mine and I got the same problem.

I think you need RecordsetType = 1  (dynaset)
0
 
sokrates053098Author Commented:
Deighton, you are right! But unfortunately I have to use the index-property which is not available with a recordset of the type dynaset. Thank you for your support. Please leave another note, so I can grade your answer (I pushed the wrong button after reading your message). By the way, I can't find any documentation about this coherence. Should this be a bug?
0
 
deightonCommented:
Repeat of answer as requested.

I notice you are using a table type recordset (RecordsetType = 0) in the Data - I changed this om
      mine and I got the same problem.

      I think you need RecordsetType = 1  (dynaset)

- you probably already know this but - Note a dynaset should give you all the functionality of an indexed table and more using findfirst instead of seek.  I'll try and find out why a table doesn't work.
0
 
deightonCommented:
I think a table doesn't work because of the limitations of searching tables - I couldn't find any documentation about this.  I tried

Private Sub Form_Activate()                'THIS DOES NOT WORK EITHER!!!
    Data1.Recordset.Index = "MyIndex"
End Sub

Private Sub DBCombo1_KeyPress(KeyAscii As Integer)
     Data1.Recordset.Seek ">=", Chr(KeyAscii)
End Sub

but this had no affect!  It is definitely a failing on the part of VB
0
 
sokrates053098Author Commented:
Not the only one!
Thanks a lot - I'll manage it with dynasets.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now