I
InventoryQueryGuy
Is there a way in which I can weight my results. I would like a query based
on input from a form. In this form there is a choice of 1. Product / Service
2. Skill / Competency 3. Therapeutic Area. Each of these has a rating and
separate queries to pull a result above the rating value and supply a Name
output. I have created combo boxes beside each of these for a weighting in
order to query all three at once and then return the ranked results as a
Name. I think I may need a query inside a query in order to perform the
calculation that is, multiplying the rating by the weighting. Does anyone
have any ideas as to how to approach this? There is a separate table for each
of the 3 choices and I can't change this. I have attached my SQL, but I think
I have a critical problem with the setup.
SELECT [Employee List].Name, [Employee List].Title, [Employee
List].Department, [Employee List].[Office Location]
FROM (([Employee List] INNER JOIN [Prod_Serv data] ON [Employee List].ID =
[Prod_Serv data].Name) INNER JOIN [Skill_Comp data] ON ([Prod_Serv data].ID =
[Skill_Comp data].ID) AND ([Employee List].ID = [Skill_Comp data].Name))
INNER JOIN [Thera data] ON ([Prod_Serv data].ID = [Thera data].ID) AND
([Employee List].ID = [Thera data].Name)
WHERE ((([Prod_Serv data].[Product /
Service])=[Forms]![ProSer_SkiCom_Thera]![Prod_Serv]) AND (([Prod_Serv
data].Rating)>=[Forms]![ProSer_SkiCom_Thera]![ProdServRating]) AND (([Thera
data].[Therapeutic Area])=[Forms]![ProSer_SkiCom_Thera]![Thera]) AND (([Thera
data].Rating)>=[Forms]![ProSer_SkiCom_Thera]![TherapyRating]) AND
(([Skill_Comp data].[Skill /
Competency])=[Forms]![ProSer_SkiCom_Thera]![SkillComp]) AND (([Skill_Comp
data].Rating)>=[Forms]![ProSer_SkiCom_Thera]![SkillCompRating]));
on input from a form. In this form there is a choice of 1. Product / Service
2. Skill / Competency 3. Therapeutic Area. Each of these has a rating and
separate queries to pull a result above the rating value and supply a Name
output. I have created combo boxes beside each of these for a weighting in
order to query all three at once and then return the ranked results as a
Name. I think I may need a query inside a query in order to perform the
calculation that is, multiplying the rating by the weighting. Does anyone
have any ideas as to how to approach this? There is a separate table for each
of the 3 choices and I can't change this. I have attached my SQL, but I think
I have a critical problem with the setup.
SELECT [Employee List].Name, [Employee List].Title, [Employee
List].Department, [Employee List].[Office Location]
FROM (([Employee List] INNER JOIN [Prod_Serv data] ON [Employee List].ID =
[Prod_Serv data].Name) INNER JOIN [Skill_Comp data] ON ([Prod_Serv data].ID =
[Skill_Comp data].ID) AND ([Employee List].ID = [Skill_Comp data].Name))
INNER JOIN [Thera data] ON ([Prod_Serv data].ID = [Thera data].ID) AND
([Employee List].ID = [Thera data].Name)
WHERE ((([Prod_Serv data].[Product /
Service])=[Forms]![ProSer_SkiCom_Thera]![Prod_Serv]) AND (([Prod_Serv
data].Rating)>=[Forms]![ProSer_SkiCom_Thera]![ProdServRating]) AND (([Thera
data].[Therapeutic Area])=[Forms]![ProSer_SkiCom_Thera]![Thera]) AND (([Thera
data].Rating)>=[Forms]![ProSer_SkiCom_Thera]![TherapyRating]) AND
(([Skill_Comp data].[Skill /
Competency])=[Forms]![ProSer_SkiCom_Thera]![SkillComp]) AND (([Skill_Comp
data].Rating)>=[Forms]![ProSer_SkiCom_Thera]![SkillCompRating]));