Hi Criss ---
Yes, but you would have to create temporary indexes (same INDEX command) on all three fields in the view, change the index order, and refresh the grid.
>Excellent suggestion, John! Thanks for the change in perspective.
>
>One more question. I need to change sorting order on the fly to patient name, SSN, or medical record number. Would a parameterized view, with the sorting order as the parameter, be the best choice for my grid source in this case?
>
>>Hi Criss --
>>
>>Setting a ControlSource to a function is not a good idea; I can well imagine that the behavior would be hard to manage.
>>
>>Why not try the following: Create a cursor or view with the decrypted information and use that as the source of the grid. I guess what I am saying is, overall, decouple your encryption/decryption stuff; tie it into saving and retrieving data and get it out of the UI.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05