the style of the combo box is change at the Properties windows...
Main Topics
Browse All TopicsI've used the DBCombo control on several apps in VB5/ISGDataControl(ADO). Works fine, displays the ListField items in dropdown - but have never been able to get it to search the ListField for the users input. VB5 help sez: "Users can search the DBCombo control by typing a value into the text box portion of the control. Once entered, this value is located in the list and the current list item is set to that item." This isn't happening, regardless of how I set any/every property that appears even remotely related to the seach behavior that I assume exists. Any help would be greatly appreciated.
Dan Foster
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Thanks, but I've tried the dbcDropDownList Style setting - and just about every other property/method that I can find, without success. I am using the DBCombo control that came with the Enterprise version of VB5 with SPk3 installed. I'll try an eval of 3rd party list controls, but still I wonder if it is a known limitation of the standard control when using ADO (ISGData control)or something else...
Hi DanFosyer
Try this it worked for me
Put the following code in the combo...
Private Sub cboAccess_KeyUp(Index As Integer, KeyCode As _
Integer, Shift As Integer)
Call cboAddChar(cboAccess(Index
End Sub
and put the following code in a module ....
Public Function cboAddChar(pComboListBox As Object, pKey As Integer, pShift As Integer) As Long
' This function will check to see if the text value of the combo
' box is equal to any of the list items. The list will be check
' only if the shiftstate is not control or alt and if the key is
' a control character
Dim lResult As Long
On Error GoTo Err_cboAddChar
lResult = -1
Select Case pKey
Case 0 To 31
Case vbKeyEnd, vbKeyHome, vbKeyLeft, vbKeyUp, _
vbKeyRight, vbKeyInsert, vbKeyDelete
If pShift = 2 Then 'control key pressed
lResult = cboSelString(pComboListBox
End If
Case Else
If pShift < 2 Then 'shift key or none
lResult = cboSelString(pComboListBox
End If
End Select
cboAddChar = lResult
Exit Function
Err_cboAddChar:
Select Case Err.Number
Case Else
cboAddChar = -1
Exit Function
End Select
End Function
Public Function cboSelString(pComboListBox
'this function works like a quick fill in Quicken. This function is called
'in a change event of a combobox and finds the item in the list based on the
'first characters that the user types. If it finds a match, the user's input
'is left unhighlighted while the remaining characters are highlighted.
Dim nIndex As Long
Dim cSearch As String
Dim cFound As String
' get the contents in input box
cSearch = LTrim(pComboListBox.Text)
nIndex = SendMessage(pComboListBox.
cSearch)
If (nIndex <> -1) Then ' -1 means found nothing
pComboListBox.ListIndex = nIndex 'display the found item
cFound = pComboListBox.List(nIndex)
If (Len(cFound) >= Len(cSearch)) Then 'highlight remainder
pComboListBox.SelStart = Len(cSearch)
pComboListBox.SelLength = Len(cFound) - Len(cSearch)
End If
End If
cboSelString = nIndex 'returns -1 if not found, else returns index
End Function
good luck
Craig
Craig, Thanks for the code. I gave it a shot in a testApp. Encountered problem because the SendMessage function from your code appears to be undefined. My testApp chokes on:
nIndex = SendMessage(pComboListBox.
cSearch)
I can't finded any embedded functions by this name. What does SendMessage reference. Thanks, Dan
Business Accounts
Answer for Membership
by: wenchangPosted on 1999-01-06 at 16:55:08ID: 1498781
you could try to change the style of the DBCombo to there might be some limitations to this style...1 that i know is that you can't assign value to the combo box...you can only drop down to select the value...
2 - dbcDropdownList...although