Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
QSL against a ADODB.recordset
Message
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00492122
Message ID:
00492346
Vues:
17
I have a requirement to allow sorting in the listbox. Not on the first element but on one OR two of the elements in the list. My desired end result is to be able to 'Order by Submit, Office'
There is the ability for them to modify the subission status so the data in the list no longer matched the origional data drawn from AND they have the option to renig their requested changes. In a nutshell I need to be able to get an Order by item, item2 type result from list items that are not in a table. :(

>What do you need exactly? You can use the Filter method or the Find method but you can't SELECT on a recordset.
>
>>How would I query against this on the fly recordset? Its built from a listbox. the listbox items are created from other individual elements.
>>
>>
>>Dim Rs As ADODB.Recordset, aCols As Variant, strMark As String
>>
>>    Set Rs = New ADODB.Recordset
>>    With Rs.Fields ' crreate RSs fields
>>        .Append "Office", adBSTR ' Office number
>>        .Append "Submit", adBSTR ' Submitted Flag
>>        .Append "Descri", adBSTR ' The desc and the sub date
>>        Rs.Open ' open our new rs
>>
>>        ' Create the array to facilitate record entry
>>        aCols = Array(.Item(0).Name, .Item(1).Name, .Item(2).Name)
>>    End With
>>
>>    Dim x
>>    For x = 0 To oList.ListCount - 1
>>        If oList.Selected(x) = True And Mid(oList.List(x), 7, 1) = strMark Then
>>
>>        Rs.AddNew aCols, Array(Left(oList.List(x), 6), _
>>                           IIf((Mid(oList.List(x), 7, 1) = strMark), strMark, " "), _
>>                           Right(oList.List(x), Len(oList.List(x)) - 37))
>>
>>        End If
>>    Next
>>
>>
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform