the specified field "klant_id" could refer to more than one table listed in the FROm

voltie

Registered User.
Local time
Today, 12:07
Joined
Mar 15, 2009
Messages
20
the specified field "klant_id" could refer to more than one table listed in the FROm

HI,

i got a form KLANT and QUESTIONS.. when i search for KLANT and click on button ADD question i get the error.. the specified field "klant_id" could refer to more than one table listed in the FROm ..

can some one help me with my query..?.. i am uploading the relations and the query ...

QUERY:
SELECT Klanten.Klant_ID, Klanten.Voornaam, Klanten.Achternaam, Vragen.* FROM Klanten INNER JOIN Vragen ON Klanten.Klant_ID=Vragen.Klant_ID;

THANKS..
 

Attachments

  • relation.JPG
    relation.JPG
    33.2 KB · Views: 164
Re: the specified field "klant_id" could refer to more than one table listed in the F

SELECT Klanten.Klant_ID.... and Vragen.* is the problem.

You don't need Klanten.Klant_ID in your query since Klant_ID is included from your table Vargen.

JR:)
 
Re: the specified field "klant_id" could refer to more than one table listed in the F

SELECT Klanten.Klant_ID.... and Vragen.* is the problem.

You don't need Klanten.Klant_ID in your query since Klant_ID is included from your table Vargen.

JR:)


can you tell me please what code i have to use than..
 
Re: the specified field "klant_id" could refer to more than one table listed in the F

No code, what access is complaining about is there are 2 instances of Klant_ID in the Query and throws an error.

You have included ALL the fields from Vargen by this statement:

Code:
Vragen.*

and that includes the foreign key Klant_ID, you don't need 2 instances of the same field. You have to remove Klant_ID from either Vargen or Klanten in your query.

JR
 

Users who are viewing this thread

Back
Top Bottom