The SQL in the RunSQL method cannot be a SELECT statement. This method is used to run an action or DDL query, such as UPDATE, DELETE, or CREATE TABLE. To retrieve records using a SELECT statement you'll need to use a Recordset object.
Hope this help,
Rob Cooper
Lead Software Design Engineer in Test
Microsoft Access Team
co-author: Access 2007 VBA Programmer's Reference
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at microsoft.com/info/cpyright.htm.
|