>>Hi everybody, it is a new kid on the block with a problem (what a shock!)
>>
>>Duh problem:
>>
>>1. A parent table (Orders) with two 1-1 related children tables (Location and Customer).
>>2. A read-only grid with fields from the parent table (order.id, order.description, etc.) and from the children tables (location.name and customer.name).
>>3. Occasionally (mostly at startup) the grid will point to (and show) wrong children records.
>>4. Forcing numerous refreshes does not work, but skipping record pointer in the parent or the children outside of the grid will eventually "wake up" the relations and the grid will work.
>>
>>I know that a view would work here, but we cannot use it now, so anybody ever seen this before?
>>
>>Dariusz
>
>Grids are notoriously unstable combining fields from related tables. You may get stable grid by using customized column.controlsources to bring up data from lookup tables, e.g.
>Grid.colCustomername="''+thisform.getcustomername(orders.customerid)"
>***Form.GetCustomername method, it's not necessarily form method, might be oApp.method
>LParameter nId
>IF Seek(nId,"customer","id")=.T.
>Return Customer.Name
>ELSE
>Return "unknown"
>ENDIF
Sorry, read
Grid.colCustomername.ControlSource=....
Edward Pikman
Independent Consultant