I'm using DAO to open a query, something like
Code:
Set rst = db.OpenRecordset("duplicatesForAr")
When I do that, does Access just use data from the Query, or does it actually execute the Query's SQL? That query contains the code
Code:
SELECT Ar.[Invoice No], Ar.Customer, Ar.[Invoiced Date]
FROM Ar
WHERE (((Ar.[Invoice No]) In (SELECT [Invoice No] FROM [Ar] As Tmp GROUP BY [Invoice No],[Customer] HAVING Count(*)>1 And [Customer] = [Ar].[Customer])) AND ((Ar.[Invoiced Date])>#8/10/2015#))
ORDER BY Ar.Customer, Ar.[Invoiced Date] DESC;
So by saying open "duplicatesForAr" will it execute that SQL string the query is made with?
I know with DAO, you can open SQL strings rather than the actually table/query
Code:
Set rst = db.OpenRecordset([SQL CODE HERE])
So if all else fails I will convert the SQL to a string and open it that way.