H. L. E. P.
I’m still fighting to discover a way to select a table name from the first query and pass it to the below query.
Is there a way to use [Enter a Table Name] in the below query? I could select the table name from the list shown from the above query.
Simple is usually easier and faster!
Thanks . . . Rick
I’m still fighting to discover a way to select a table name from the first query and pass it to the below query.
Code:
SELECT MSysObjects.Name
FROM MSysObjects
WHERE (((MSysObjects.Name) Not Like "~*" And (MSysObjects.Name) Not Like "MSys*") AND ((MSysObjects.Type) In (1,4,6)));
Is there a way to use [Enter a Table Name] in the below query? I could select the table name from the list shown from the above query.
Code:
SELECT OfcName, ‘(I believe this is where the tableName from the above query ahould go?)
Sum(IIf(S.ListName Like C.OfcName & "*" And S.SellName Like C.OfcName & "*",1,0))*2 AS WSO,
Sum(IIf(S.ListName Like C.OfcName & "*" And S.SellName Like C.OfcName & "*",S.SalePrice,0))*2 AS WSODV,
Sum(IIf(S.ListName Like C.OfcName & "*" And Nz(S.SellName) Not Like C.OfcName & "*",1,0)) AS TSO,
Sum(IIf(S.ListName Like C.OfcName & "*" And Nz(S.SellName) Not Like C.OfcName & "*",S.SalePrice,0)) AS TSODV,
Sum(IIf(S.ListName Not Like C.OfcName & "*" And S.SellName Like C.OfcName & "*",1,0)) AS WST,
Sum(IIf(S.ListName Not Like C.OfcName & "*" And S.SellName Like C.OfcName & "*",S.SalePrice,0)) AS WSTDV,
WSO+TSO+WST AS [Total Transactions],
Sum(IIf(S.ListName Like C.OfcName & "*",S.SalePrice,0)) AS [Listing Dollar Volume],
WSODV+TSODV+WSTDV AS [Listing and Sales Dollar Volume]
FROM CBAll AS C, SCMLS AS S
GROUP BY C.OfcName
ORDER BY 10;
Simple is usually easier and faster!
Thanks . . . Rick