Another strange thing in Access.
I have developed (an admittedly longish) query in Access and used the SQL in a Function in VBA.
But the function fails to return the correct results because the main SQL query in the function never returns any records. But if I do a DEBUG.PRINT and copy the SQL generated to create a query in the Query window a strange thing happens. At first no records are returned. But if I switch to the Query design grid
then delete and replace (indentically) any parameter
(eg >0 - delete the '0' and relace it with '0' again) then run the query results are returned.
In checking what changes are made by this action to the SQL in SQL design view I can see no alterations except seeminly unimportant repositioning of the SQL code. As far as I can see it is the same SQL statement.
Any ideas what to do here?
If Access is so fussy about the positioning of SQL code
then how can I make the VBA function speak to Access iin the dialect it prefers?