I've looked through the forums and know this question has been asked before, but even after trying what has been suggested I still can't get this to work. I'm fairly new to both VBA and SQL so that could explain why I'm struggling.
What I'm trying to do is create a Form that when executed runs this query:
strSQL = "SELECT new.[Service Name], new.WBS, new.[Billing Code], new.[CPU Units], new.[VCPU Units], new.[Billing Status], new.[Bill To] " & _
" FROM " & strNew & " AS new LEFT JOIN " & strOld & " AS old ON new.[Service Name] = old.[Service Name] " & _
" WHERE old.[Service Name] Is Null;"
I created the form and have stored the user inputs into both strNew and strOld respectively. However when I execute this code, I receive an error. I've confirmed the values inputted into the form are actual "tables" that are located in the database. Why does this not work? I appreciate the help.
left join ont1.a = t2.a,wheret2.a isnull? You should be aware that under ANSI (read: sane) rules, nothing is equal to anull- not even anothernull. So even if you fix the syntax of the query, its sense will still be way off. And even if you worked under relaxed (read: bad) rules regarding comparingnulls, thejoinwould be pointless; you would (for whatever unclear reason) simply need to do awhereon each table.columnis null.