ken bohnenkamp
24th September 2002, 00:06
I have a manufacturer table (armcs010) with a Primary index called mano. I have another table called profile (arcom001) that has the fields mano and buhm. I want both of these fields to reference the manufactures table. So I go into maintain table fields for profile and find the field mano and then reference the manufacturer table. This seems to work fine. I then find the field buhn and also reference it to the manufacturer table. When I try to build the session, I get the error 'Reference of armcs010.buhm does not exist". It seems that if the file you are referencing doesn't have the same fieldname in the table you are maintaining, there is a problem. Why is this and is there a workaround for something like this? All I really want to do is display the name of the manufacturer when these two fields are input on a form. I thought doing it this way would work and I wouldn't have to write any code. Any help would be appreciated.

dbinderbr
24th September 2002, 00:10
Hello !

Why dont you use combined fields to make the reference?

shah_bs
24th September 2002, 02:40
In the type of relationship that you describe, namely, ONE Manufacturer can have MANY Profile records, it is necessary for the definition of the Profile table to refer to Manufacturer table by only its Primary Key, that is 'mano'. There is no need to and is not possible to include any other fields to refer to the Manufacturer table. What you did the first time round is o.k. As soon as Manufacturer Code is entered, you will be able to display details from the Manufacturer table.

guilmor
24th September 2002, 13:33
If that's the case, then refer it to that table.
Otehrwise, Is field buhm part of index1 in the first table? If the answer is yes, you could create a combined field on armcs010, with both fields, then, change index1, with then new combined field. Also, create combined field in second table, and do the same, referencing the comb. from 2nd. table to comb. from 1st. table.

Gulmor

Armando_Rod2000
24th September 2002, 15:34
I believe that it is impossible to do it. Your are working with a cartesian product, that is to say, in the table armcs010 there is a single registry and in the table arcom001 there is more than one registry.