In Microsoft Jet databases, this error occurs if you do not select a table name when you create a query. Select at least one table or query.
In ODBCDirect databases, this error occurs if you attempt to execute a query that does not contain an SQL statement. Include at least one query or stored procedure call in the QueryDef object’s SQL property.