Hello,
I've created a DB a while ago and I'm quite rusty on access these days, turns out that the query is returning duplicated values, I remember having read that the INNER JOIN might have something to do with it, but can't remember how to fix it, here is the SQL,
I'd appreciate any help provided
Code:
SELECT [tbl-Pretemp].Tiempo, [tbl-Pretemp].Alimento, [tbl-Pretemp].Gramos, [tbl-Pretemp].Día, [tbl-Pretemp].Paciente, NUTR_DEF.Nutr_No, NUTR_DEF.NutrDesc, NUT_DATA.Nutr_Val, NUTR_DEF.Units, [Nutr_Val]*[Gramos]/100 AS [N utr_PP], NUTR_DEF.Rep
FROM NUTR_DEF INNER JOIN (((FOOD_DES INNER JOIN [tbl-Pretemp] ON FOOD_DES.NDB_No = [tbl-Pretemp].Alimento) INNER JOIN WEIGHT ON FOOD_DES.NDB_No = WEIGHT.NDB_No) INNER JOIN NUT_DATA ON FOOD_DES.NDB_No = NUT_DATA.NDB_No) ON NUTR_DEF.Nutr_No = NUT_DATA.Nutr_No
WHERE ((([tbl-Pretemp].Paciente)=[forms]![frm-DietProgram]![txtUserID]) AND ((NUTR_DEF.Rep) Like "1"));
Regards!