lovemuscle2005
Board Regular
- Joined
- Dec 28, 2004
- Messages
- 99
Hi All,
I'm trying to run the following SQL statement via RUNSQL, but not getting very far, can anyone help?
Thanks
Option Compare Database
Function BLANKSSQL()
On Error GoTo BLANKSSQL_Err
DoCmd.RunSQL "SELECT [Store Lookup List].[Store No], [Store Lookup List].[Store Name], [Store Lookup List].Region, [Store Lookup List].Division FROM (([Store Lookup List] LEFT JOIN [MQ1 Test] ON [Store Lookup List].[Store No] = [MQ1 Test].[Store No]) LEFT JOIN [MQ2 Test] ON [Store Lookup List].[Store No] = [MQ2 Test].[Store No]) LEFT JOIN [MQ3 Test] ON [Store Lookup List].[Store No] = [MQ3 Test].[Store No] WHERE ((([MQ1 Test].[New Contracts]) Is Null));"
TestSQL_Exit:
Exit Function
BLANKSSQL_Err:
MsgBox Error$
Resume TestSQL_Exit
End Function
I'm trying to run the following SQL statement via RUNSQL, but not getting very far, can anyone help?
Thanks
Option Compare Database
Function BLANKSSQL()
On Error GoTo BLANKSSQL_Err
DoCmd.RunSQL "SELECT [Store Lookup List].[Store No], [Store Lookup List].[Store Name], [Store Lookup List].Region, [Store Lookup List].Division FROM (([Store Lookup List] LEFT JOIN [MQ1 Test] ON [Store Lookup List].[Store No] = [MQ1 Test].[Store No]) LEFT JOIN [MQ2 Test] ON [Store Lookup List].[Store No] = [MQ2 Test].[Store No]) LEFT JOIN [MQ3 Test] ON [Store Lookup List].[Store No] = [MQ3 Test].[Store No] WHERE ((([MQ1 Test].[New Contracts]) Is Null));"
TestSQL_Exit:
Exit Function
BLANKSSQL_Err:
MsgBox Error$
Resume TestSQL_Exit
End Function