Hello,
I have searched through this and other forums for an answer to my puzzle, but so far everything I have found is overly complicated compared to what I want to do !!
Basically what I want is to be able to display a total count of a particular product type into a single text box, so that I can have on the form :
You have [number] of product type in stock.
My SQL code works correctly but when I add it to the control source of the unbound text box I get "#Name?" instead.
The SQL statement is:
SELECT Peripherals.PerType, Sum(Peripherals.Quantity) AS SumOfQuantity
FROM Peripherals
GROUP BY Peripherals.PerType
HAVING (((Peripherals.PerType)="Mouse"))
ORDER BY Peripherals.PerType;
Is this the correct way to be putting a SQL statement in the control source ?
Thanks
Damob
I have searched through this and other forums for an answer to my puzzle, but so far everything I have found is overly complicated compared to what I want to do !!
Basically what I want is to be able to display a total count of a particular product type into a single text box, so that I can have on the form :
You have [number] of product type in stock.
My SQL code works correctly but when I add it to the control source of the unbound text box I get "#Name?" instead.
The SQL statement is:
SELECT Peripherals.PerType, Sum(Peripherals.Quantity) AS SumOfQuantity
FROM Peripherals
GROUP BY Peripherals.PerType
HAVING (((Peripherals.PerType)="Mouse"))
ORDER BY Peripherals.PerType;
Is this the correct way to be putting a SQL statement in the control source ?
Thanks
Damob