Solved

dbcombo autosearch does not work

Posted on 1998-05-30
9
271 Views
Last Modified: 2008-02-01
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
Comment
Question by:sokrates053098
  • 4
  • 4
9 Comments
 
LVL 8

Expert Comment

by:Helicopter
ID: 1462099
Have you set the match entry property to 0-dblBasicMatching?
0
 

Author Comment

by:sokrates053098
ID: 1462100
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
 
LVL 18

Expert Comment

by:deighton
ID: 1462101
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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:sokrates053098
ID: 1462102
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
 
LVL 18

Expert Comment

by:deighton
ID: 1462103
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
 

Author Comment

by:sokrates053098
ID: 1462104
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
 
LVL 18

Accepted Solution

by:
deighton earned 100 total points
ID: 1462105
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
 
LVL 18

Expert Comment

by:deighton
ID: 1462106
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
 

Author Comment

by:sokrates053098
ID: 1462107
Not the only one!
Thanks a lot - I'll manage it with dynasets.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question