>I have a grid that displays data from the parts table. However, one of the grid columns uses the following expression as its control source.
>
>iif(seek(parts.customersid,'customers','custid'),customers.name,'')
>
>The expression looks up the customer name in the customers table and displays it in the grid along with the other parts table fields.
>
>How can I order the grid data by customer name?
I would create a cursor that denormalizes the data, and use that for the record source of the grid --
select parts.*, nvl(customers.name, padr('...n/a...', ' ' 40)) as custname ;
from parts left join customers ;
on parts.customersid = customers.custid ;
where...
Then you can index the cursor and display however you want. Pad the CustName with however many spaces needed to match the width of your customers.name field.
Mark McCasland
Midlothian, TX USA