Hello, I have created a small database for a real estate office to show reports of commission for each agent and for the total office.
Table1 has fields for sales, commission and who is the listing or selling agent or both. Field Listing Agent pulls form linked table with the list of agents.
Trying to do a query for each agent which totals and displays their commission from all sales closed or pending where they are entered as the Listing Agent, Selling Agent or both.
This doesn't seem to be working for me:
SELECT Table1.[Listing Agent], Table1.LAC, Table1.[Listing Agent 2], Table1.LAC2, Table1.[Selling Agent], Table1.SAC, Table1.[Pending/Closed], Table1.[LAC]+[LAC2]+[SAC]+[SAC2] AS [GCI to Date]
FROM Table1
WHERE (((Table1.[Listing Agent])="John Smith")) AND
WHERE (((Table1.[Listing Agent 2])="John Smith")) AND
WHERE (((Table1.[Selling Agent])="John Smith")) AND
WHERE (((Table1.[Selling Agent 2])="John Smith"));
Thanks for the help in advance!
Table1 has fields for sales, commission and who is the listing or selling agent or both. Field Listing Agent pulls form linked table with the list of agents.
Trying to do a query for each agent which totals and displays their commission from all sales closed or pending where they are entered as the Listing Agent, Selling Agent or both.
This doesn't seem to be working for me:
SELECT Table1.[Listing Agent], Table1.LAC, Table1.[Listing Agent 2], Table1.LAC2, Table1.[Selling Agent], Table1.SAC, Table1.[Pending/Closed], Table1.[LAC]+[LAC2]+[SAC]+[SAC2] AS [GCI to Date]
FROM Table1
WHERE (((Table1.[Listing Agent])="John Smith")) AND
WHERE (((Table1.[Listing Agent 2])="John Smith")) AND
WHERE (((Table1.[Selling Agent])="John Smith")) AND
WHERE (((Table1.[Selling Agent 2])="John Smith"));
Thanks for the help in advance!