out of your outer query. Access will prompt you for the value of Lang when
you run the outer query.
>Thank you John for the help.
>Your answer is clear and simple.
>I don't know why I didn't think of trying a query on a query.
>The only thing that I am not certain of is how to make a query that calls a
>other query with a parameter.
>For example:
>My sub query Prop_NameByLanguage will be:
>SELECT Properties_Name.*
>FROM Properties_Name
>WHERE Properties_Name.Language=[Lang];
>But how do I call this query in my new SQL query?
>SELECT Properties_Desc.*, Prop_NameByLanguage.*
>FROM Properties_Desc LEFT JOIN Prop_NameByLanguage ON Properties_Desc.ID =
>Prop_NameByLanguage.PropDescID
>Where Lang = 1
>This query doesn't work!
>You cannot put the parameter in the where clause.
>Need one last little help,
>So what do you purpose John? or anybody?
>Thanks
>Louis
>>Louis-
>>In Access 97 and earlier, you have to do this with a query on a query:
>>qryPropertiesName1:
>>SELECT Properties_Name.*
>>FROM Properties_Name
>>WHERE Properties_Name.Language = 1
>>qrySolution:
>>SELECT Properties_Desc.*, Properties_Name.*
>>FROM Properties_Desc LEFT JOIN qryPropertiesName1 ON Properties_Desc.ID =
>>Properties_Name.PropDescID;
>>In Access 2000, you'll be able to do it with one query:
>>SELECT Properties_Desc.*, Properties_Name.*
>>FROM Properties_Desc LEFT JOIN
>>(SELECT Properties_Name.* FROM Properties_Name WHERE
>>Properties_Name.Language = 1) AS Properties_Name
>>ON Properties_Desc.ID =
>>Properties_Name.PropDescID;
>>--
>>John Viescas
>>author, "Running Microsoft Access 97"
>>http://www.amazon.com/exec/obidos/ISBN=1572313234/
>>>Thank you Peter for replying.
>>>Unfortunately, your answer doesn't really solve my problem or at least it
>>>solve only half my problem.
>>>I will try to explain better.
>>>If anybody can help I would be very grateful.
>>>I need to get all the records from the left table even if there is a
>record
>>>on the right table with the wrong language.
>>>For example the table would have this:
>>>Properties_Desc:
>>>ID KEY
>>>1 PropKey1
>>>2 PropKey2
>>>3 PropKey3
>>>Properties_Name
>>>PropDescID Language Name
>>>1 0 Key1Language0
>>>1 1 Key1Language1
>>>2 0 Key2Language0
>>>My query needs to return all the Property Description(Properties_Desc)
>with
>>>there names if they exist.
>>>For Language = 1
>>>It would return this:
>>> PropKey1 Key1Language1
>>> PropKey2 Null
>>> PropKey3 Null
>>>By adding a extra where clause like this:
>>>SELECT Properties_Desc.*, Properties_Name.*
>>>FROM Properties_Desc LEFT JOIN Properties_Name ON Properties_Desc.ID =
>>>Properties_Name.PropDescID
>>>WHERE Properties_Name.Language) = 1 OR Properties_Name.Language) = NULL
>>>This will only give me the 3rd row but not the second one.
>>>I hope this example makes it more clear.
>>>Thanks for you help.