Well, I'm not just bringing back 1 record from query, so I can't just do a
WHERE condition.
My situation is this. I select 10 columns, with x number of rows and store
in recordset. I need to translate rs("title") to a different language, sort
by translated title, then display everything back (all 10 columns in the
order of sorted Title)
There's no way to pre-sort this translated Title from query by any means.
So, I do a regular query to retrieve all rows.
1. extract rs("title") from recordset to an array
2. translate rs("title") and sort the array, then move this into Dictionary
Object
3. now, the challenge is to display the recordset in the order of the sorted
dictionary. There's no way I can think of to match sorted dictionary with
the recordset, other than the Key index of the Dict. So, I loop through dict
and display like this:
For Each K in Dict
' K = 12, 4, 0, 2, 5....
rs.Move K, 1
'move to record K of RS recordset
'now I can call
RS("col1"), RS("col2")....Dict(F)....RS("colx")
Next
This actuall does the trick. I just couldn't get RS.Move to work because I
had a wrong CursorType. Everything is working now. Thanks Bob for your
reply.
If you have other ways of accomplishing what I describe above, please
advice.
I also thought there should be a way to update RS.("title") =
Translated_Title, then I can call RS.Sort Title ...but I don't think I can
update the recordset in this manner.
HH
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:OS**************@tk2msftngp13.phx.gbl...
I'm trying to use either one of these methods to position the cursor in
a specific position inside a recordset, but neither one seems to work.
Why don't you get that record (or whatever subject you're using) via a
WHERE clause??? Why bother bringing back rows if you're not going to look at
them?