Hi,
I have the following query which runs fine when I run it through SqlYog and returns what I am looking for.
When I run it through Access VBA though, I get a 3075 RunTime Error Syntax error (missing operator) in query expression. 'MAX(InBoxRecNo)InBoxRecNo'.
The table it is looking up is in a MySQL backend, and both SqlYog and Access and connecting to the same table.
Any ideas?
I have the following query which runs fine when I run it through SqlYog and returns what I am looking for.
Code:
Set rs2 = db.OpenRecordset("SELECT * FROM inboxvalues_v2 INNER JOIN (SELECT MAX(InBoxRecNo)InBoxRecNo FROM inboxvalues_v2 i WHERE InboxOboxRecno = 645 AND InboxDateTime < '2014-04-07' GROUP BY InBoxOBoxRecNo)tempTbl ON inboxvalues_v2.InBoxRecNo = tempTbl.InBoxRecNo")
When I run it through Access VBA though, I get a 3075 RunTime Error Syntax error (missing operator) in query expression. 'MAX(InBoxRecNo)InBoxRecNo'.
The table it is looking up is in a MySQL backend, and both SqlYog and Access and connecting to the same table.
Any ideas?