|
-
Sep 28th, 2002, 02:15 PM
#1
Thread Starter
Hyperactive Member
***RESOLVED****need some coding help
How do I add ORDER BY [AdjusterLastName] in the following ??
Adodc1.Recordset.Filter = "AdjusterLastName = '" & DataCombo1.Text & "'"
Thanks for any and all help
Last edited by Tailgun; Sep 28th, 2002 at 06:18 PM.
-
Sep 28th, 2002, 03:41 PM
#2
Hyperactive Member
Isn't that a SQL Command?
Visual Baisc 6 (SP5)
Windows Xp
-
Sep 28th, 2002, 03:46 PM
#3
Hyperactive Member
I Think This is what you want
VB Code:
adodc1.Recordset.Open "Select * From Table ORDER BY [AdjusterLastName]
Visual Baisc 6 (SP5)
Windows Xp
-
Sep 28th, 2002, 04:15 PM
#4
Thread Starter
Hyperactive Member
yes it is a SQL command but if I use
adodc1.Recordset.Open "Select * From Table ORDER BY [AdjusterLastName]
It works fine till I filter the recordset then it will not ORDER BY
I have to filter the recordset since the user selects a Client and based on that client only those Adjusters associated with that client appear in the DataCombo Adjusters list hence the original problem where the recordset is filtered by a Client DataCombo.
I dunno why it doesn't maintain the original ORDER BY when it is later filtered
-
Sep 28th, 2002, 05:45 PM
#5
Junior Member
TailGun
I had a situation like this before and solved closing the recordset and reopening with the filter and the ordering.
VB Code:
adodc1.Recordset.Close
adodc1.Recordset.Open "Select * From Table WHERE AdjusterLastName = '" & DataCombo1.Text & "' ORDER BY [AdjusterLastName]"
-
Sep 28th, 2002, 06:17 PM
#6
Thread Starter
Hyperactive Member
thanks LucianoBraatz
that did the trick
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|