Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sort list in DataCombo control
Message
From
03/07/2000 02:00:17
 
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00387633
Message ID:
00387662
Views:
10
I have tried to include in the SELECT statment, it works.
But I would like to sort it at the Recordset level, because
I have a few Combo controls that usese diferrent sort field.

In this way, I only need to do the SELECT statment once and
the Sort will be at the Recordset(3 times). Thanks for your help.

>Hi,
>Try to include the sort in your SELECT statment like this :
>
>.Open "SELECT * FROM Customer ORDER BY CustID",cnn1,adOpenKeyset,adLockOptimistic
>
>Hope this help
>Rgrds
>
>
>>I tried to sort the Recordset but it doesn't display correctly.
>>Anything when wrong with my codes as follows:
>>
>>Set rsCustLookup = New ADODB.Recordset
>>With rsCustLookup
>> .CursorLocation = adUseClient
>> .Open "SELECT * FROM Customer",cnn1,adOpenKeyset,adLockOptimistic
>> .Sort = CustID
>> .Requery
>>End With
>>
>>Set dcCustIDList.RowSource = rsCustLookup
>>dcCustIDList.ListField = "CustID"
>>dcCustIDList.Refresh
Previous
Reply
Map
View

Click here to load this message in the networking platform