Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

dbcombo autosearch does not work

Posted on 1998-05-30
9
Medium Priority
?
279 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 300 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

618 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