Если я правильно помню, то это SQL запрос должен быть.
Добавлено @ 23:49 неправильно помню 
MSDN для ADO
| Код | recordset.Open Source, ActiveConnection, CursorType, LockType, Options Parameters Source Optional. A Variant that evaluates to a valid Command object, an SQL statement, a table name, a stored procedure call, a URL, or the name of a file or Stream object containing a persistently stored Recordset. ActiveConnection Optional. Either a Variant that evaluates to a valid Connection object variable name, or a String that contains ConnectionString parameters. CursorType Optional. A CursorTypeEnum value that determines the type of cursor that the provider should use when opening the Recordset. The default value is adOpenForwardOnly. LockType Optional. A LockTypeEnum value that determines what type of locking (concurrency) the provider should use when opening the Recordset. The default value is adLockReadOnly. Options Optional. A Long value that indicates how the provider should evaluate the Source argument if it represents something other than a Command object, or that the Recordset should be restored from a file where it was previously saved. Can be one or more CommandTypeEnum or ExecuteOptionEnum values, which can be combined with a bitwise AND operator.
|
MSDN для DAO
| Код | Dim dbsNorthwind As Database Dim rstTable As Recordset Dim rstDynaset As Recordset Dim rstSnapshot As Recordset Dim rstForwardOnly As Recordset Dim rstLoop As Recordset Dim prpLoop As Property
Set dbsNorthwind = OpenDatabase("Northwind.mdb")
With dbsNorthwind
' Open one of each type of Recordset object. Set rstTable = .OpenRecordset("Categories", _ dbOpenTable) Set rstDynaset = .OpenRecordset("Employees", _ dbOpenDynaset) Set rstSnapshot = .OpenRecordset("Shippers", _ dbOpenSnapshot) Set rstForwardOnly = .OpenRecordset _ ("Employees", dbOpenForwardOnly)
|
Добавлено @ 23:54 ну и то, о чем говорил я.
| Цитата |
Syntax
expression.OpenRecordset(Name, Type, Options, LockEdit)
expression A variable that represents a Database object.
Parameters
Name Required String The source of the records for the new Recordset. The source can be a table name, a query name, or an SQL statement (SQL string/statement: An expression that defines an SQL command, such as SELECT, UPDATE, or DELETE, and includes clauses such as WHERE and ORDER BY. SQL strings/statements are typically used in queries and in aggregate functions.) that returns records. For table-type Recordset objects in Microsoft Access database engine databases, the source can only be a table name. Type Optional Variant A RecordsetTypeEnum constant that indicates the type of Recordset to open. Note If you open a Recordset in a Microsoft Access workspace (Access workspace: A workspace that uses the Access database engine to access a data source. The data source can be an Access database file, an ODBC database, such as a Paradox database, or an ISAM database.) and you don't specify a type, OpenRecordset creates a table-type Recordset, if possible. If you specify a linked table (linked table: A table stored in a file outside the open database from which Access can access records. You can add, delete, and edit records in a linked table, but you cannot change its structure.) or query, OpenRecordset creates a dynaset-type Recordset. Options Optional Variant A combination of RecordsetOptionEnum constants that specify characteristics of the new Recordset. Note The constants dbConsistent and dbInconsistent are mutually exclusive, and using both causes an error. Supplying a lockedits argument when options uses the dbReadOnly constant also causes an error. LockEdit Optional Variant A LockTypeEnum constant that determines the locking for the Recordset. Note You can use dbReadOnly in either the options argument or the lockedits argument, but not both. If you use it for both arguments, a run-time error occurs.
|
|