>>>Hello Gurus!!
>>>
>>>Today's question...................
>>>
>>>I have a form with a GRID on it. This grid is displaying data from 3 tables (Rx, Drug and Doctor) that are linked together this way.....
>>>
>>>Rx -> Drug through Rx.drug_id = Drug.drug_id
>>>
>>>and
>>>
>>>Rx -> Doctor through Rx.doctor_id = Doctor.doctor_id
>>>
>>>simple enough, yes?
>>>
>>>We have a button on the screen for CHANGE GRID ORDER. If pressed, the order of the grid changes.... based on the index chosen when you click the button.
>>>
>>>Presently there are only 2 indexes to switch among....
>>>1) Date order
>>>2) Descendig Rx number order.
>>>
>>>These indices are based on fields that are exclusively in the Rx table, which is the SELECTED table of the grid (the other 2 are linked and some fields displayed).
>>>
>>>NOW... we would like to be able to add a 3rd choice to the ordering displayed (and add a 3rd index to choose from). Here is the rub.....
>>>
>>>The 3rd index is on DRUG name... which is in the linked table DRUG. I can't create an index based on 2 tables to get at the Drug name..... so what options are available?
>>>
>>>Remove the 3 tables from the grid, and replace with a CURSOR of the 3 tables, so as to get at the field DRUG_NAME in DRUG? Or what?
>>>
>>>Thanks in advance!!!
>>>Tommy
>>
>>Tommy,
>>A little confused but I think you mean they're related tables or simply used (linkmaster,childorder.. properties) in grid. That limits you on ordering of child tables.
>>
>
>You are correct.
>
>>Instead you could make your recordsource an SQL (it's readonly, right?) and index your columns as you wish.
>>
>
>Well, it turns out there is a lot of dynamic things being done to the Rx table from this grid... (like Voiding the Rx, Refilling the Rx, etc.). So it would have to be a Writable Cursor, or a cursorAdapter.... yike!!!)
>
>Thanks for the help!
>
>>PS: Check FoxyClasses samples application.
>>Cetin
>
>I will.
"So it would have to be a Writable Cursor". You coud have a writable cursor but not needed. You could instead move pointer(s) in base tables as you move in grid (that's the technique FoxyClasses Grids.LocatorGrid class uses).
Cetin