>Hi!
>
>I've created a view with view designer. It has one "Invioice" table and 3 related lookup tables ("customer", "type", "country") all related to "Invioice". I join these tables and select all fields from "Invoice" and "...name" fields from lookup tables ("customer", "type", "country"). In the result cursor the last lookup table's "...name" filed doesn't seem to show the correct names (all the rows shows the same data while the codes in "Invioice" table are different). What can be wrong? The first 2 related tables works fine. I've tried to change the order of the lookup tables but the problem is allways with last table.
>
>SELECT Invoice.*, Customer.cust_name, Type.type_name, Country.count_name;
> FROM data1!Customer INNER JOIN data1!Invoice;
> INNER JOIN data1!Type;
> INNER JOIN data1!Country ;
> ON Country.count_code = Invoice.count_code ;
> ON Type.type_code = Invoice.type_code ;
> ON Customer.cust_code = Invoice.cust_code
>
>Thanks for any help.
These kind of joins are a little bit above designers capabilities. Do it programmatically :
Create SQL view 'ViewName' as ;
SELECT Invoice.*, Customer.cust_name, Type.type_name, Country.count_name;
FROM force data1!Customer ;
INNER JOIN data1!Invoice ON Customer.cust_code = Invoice.cust_code ;
INNER JOIN data1!Type ON Type.type_code = Invoice.type_code ;
INNER JOIN data1!Country ON Country.count_code = Invoice.count_code
Keeping join conditions with the join causes less coding errors. You might try to omit 'force' but then view could be opened and screwed by the designer.
Cetin