S
Sue
I'm trying to run a query in VBA. Code as follows:
SQL = "SELECT Temp.Polisnommer " & _
"FROM (Temp LEFT JOIN LMS ON " & _
"Temp.Polisnommer = LMS.Polisnommer) " & _
"WHERE (((LMS.Polisnommer) Is Null));"
DoCmd.RunSQL SQL
When I step through, I get the following error message:
Error Message 2342
'A runSQL action requires an argument consisting of an SQL statement. '
The above SQL was tested in the Query SQL area and does work. But as soon as
I try to run it in the VBA shell, it doesn't. WHY?
Thanks
SQL = "SELECT Temp.Polisnommer " & _
"FROM (Temp LEFT JOIN LMS ON " & _
"Temp.Polisnommer = LMS.Polisnommer) " & _
"WHERE (((LMS.Polisnommer) Is Null));"
DoCmd.RunSQL SQL
When I step through, I get the following error message:
Error Message 2342
'A runSQL action requires an argument consisting of an SQL statement. '
The above SQL was tested in the Query SQL area and does work. But as soon as
I try to run it in the VBA shell, it doesn't. WHY?
Thanks