R
Ron
The following SQL Statement will only show 3 items no matter how many items
meet the criteria and I cannot understand why:
SELECT [Meals Defined].MealDate, [Meals Defined].Meal, [Meals
Defined].Quantity, FoodItems.ServSize, FoodItems.ServUnits,
[FoodItems]![TotCarbs]*([Meals Defined]![Quantity]/[FoodItems]![ServSize]) AS
CarbsUsd, ([Protein]*[Meals Defined]![Quantity]/[FoodItems]![ServSize]) AS
ProtUsd, [Calories]*([FoodItems]![ServSize]/[Meals Defined]![Quantity]) AS
CalUsd, [Sugars]*([FoodItems]![ServSize]/[Meals Defined]![Quantity]) AS
SugUsd, FoodItems.Potassium, [TotFat]*([FoodItems]![ServSize]/[Meals
Defined]![Quantity]) AS FatUsd, FoodItems.ItemName
FROM [Meals Defined] LEFT JOIN FoodItems ON [Meals Defined].[Food Name] =
FoodItems.ItemName
WHERE ((([Meals Defined].MealDate)=[Enter the Date of the meal]));
As you can see there are two tables which are joined and in the one table
(Meals Defined) there are several MealDate which have many rows of items
which match the selection criteria. This query will only pick 3 rows to show
all of the fields. It may show the remaining rows, but only some of the
fields.
Can you please show me what's wrong?
TIA
meet the criteria and I cannot understand why:
SELECT [Meals Defined].MealDate, [Meals Defined].Meal, [Meals
Defined].Quantity, FoodItems.ServSize, FoodItems.ServUnits,
[FoodItems]![TotCarbs]*([Meals Defined]![Quantity]/[FoodItems]![ServSize]) AS
CarbsUsd, ([Protein]*[Meals Defined]![Quantity]/[FoodItems]![ServSize]) AS
ProtUsd, [Calories]*([FoodItems]![ServSize]/[Meals Defined]![Quantity]) AS
CalUsd, [Sugars]*([FoodItems]![ServSize]/[Meals Defined]![Quantity]) AS
SugUsd, FoodItems.Potassium, [TotFat]*([FoodItems]![ServSize]/[Meals
Defined]![Quantity]) AS FatUsd, FoodItems.ItemName
FROM [Meals Defined] LEFT JOIN FoodItems ON [Meals Defined].[Food Name] =
FoodItems.ItemName
WHERE ((([Meals Defined].MealDate)=[Enter the Date of the meal]));
As you can see there are two tables which are joined and in the one table
(Meals Defined) there are several MealDate which have many rows of items
which match the selection criteria. This query will only pick 3 rows to show
all of the fields. It may show the remaining rows, but only some of the
fields.
Can you please show me what's wrong?
TIA