Link to home
Start Free TrialLog in
Avatar of Crystalsoft
Crystalsoft

asked on

Ascending records in Datacombo.

Hello experts
I am using datacombo1. but datacombo1 is not giving me records in ascending,
how can i sorting by ascending,
code is as follow.

    If KeyCode = vbKeyF1 Then
        DataCombo1.Visible = True
        DataCombo1.SetFocus
    End If

Avatar of dqmq
dqmq
Flag of United States of America image

Use Order By on the select statement that populates the combo box.
Your combobox Row Source should have something like this:

SELECT DISTINCTROW Field1 FROM TableName ORDER BY Field1 ASC;
Avatar of Crystalsoft
Crystalsoft

ASKER

Thanks for reply
according to dqmq: i used select statement in adodc "SELECT Field_Name FROM Table_Name order by Field_Name." and its working thanks

But now when i am typing record in datacombo i want to be a matching records will be highlighted. how can i do that..
For expample, i am typing a records like "4545 mp09 kb" and in the datacomo has so many records which are starting from 45, but when i am typing 454 then it must highlighted matching record., How can i do that,
Please help,

Thanks
CrystalSoft
ASKER CERTIFIED SOLUTION
Avatar of dqmq
dqmq
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am using vb6.0 - for 32 bit windows development.

in the datacombo1 property i am getting this
DataCombo1.MatchEntry = dblBasicMatching and
DataCombo1.MatchEntry = dblExtendedMatching
but both are not working.


Open your form in design mode.  Check the properties there.
There is nothing like that
Can you please send me example code so i can test and compare with my code.
Crystal Soft
Try this:

DataCombo1.Style =dbcDropdownList
DataCombo1.MatchEntry = dblExtendedMatching


Also, try clicking on an item in the list before typing.  
not getting any result

Sorry, I am out of ideas.