S
Support
New to access and queries
I have created a query that will give me negative stock items from our
database.
The query is as follows:
SELECT detail.PLU, Style.Description, detail.Stock, Location.Store
FROM (Location INNER JOIN detail ON Location.Location = detail.Location)
INNER JOIN Style ON detail.UniqueRef = Style.uniqueref
WHERE (((detail.Stock)<0))
ORDER BY detail.Location;
I have created a module and macro that will export this into excel.
The results of the query - and what is exported into excel look like:
PLU Description Stock Store
12345 shoe -1 warehouse
12545 sock -1 warehouse
12345 shoe -1 london
12346 boot -1 london
12347 trouser -1 london
I'd like to also be able to SUM the amount of stock for each location
(store). Is this possible within the same query without changing the look
too much?
I'm currently investingating COUNT also but not getting the results I want.
many thanks
I have created a query that will give me negative stock items from our
database.
The query is as follows:
SELECT detail.PLU, Style.Description, detail.Stock, Location.Store
FROM (Location INNER JOIN detail ON Location.Location = detail.Location)
INNER JOIN Style ON detail.UniqueRef = Style.uniqueref
WHERE (((detail.Stock)<0))
ORDER BY detail.Location;
I have created a module and macro that will export this into excel.
The results of the query - and what is exported into excel look like:
PLU Description Stock Store
12345 shoe -1 warehouse
12545 sock -1 warehouse
12345 shoe -1 london
12346 boot -1 london
12347 trouser -1 london
I'd like to also be able to SUM the amount of stock for each location
(store). Is this possible within the same query without changing the look
too much?
I'm currently investingating COUNT also but not getting the results I want.
many thanks