OpenRecordset VBA参数 [英] OpenRecordset VBA Parameters
问题描述
db.OpenRecordset的参数是什么?
我认为你指的是DAO(数据访问对象) OpenRecordSet 方法。请参阅下面的参数。
您还可以查看DAO帮助文件,其中包含方法调用语法和1个本地文件夹中的示例(具体取决于您拥有的DAO / Office版本)安装。)。
位置 1 : C:\Program Files \Common Files\Microsoft Shared\Office10\1033\DAO360.CHM
位置2: C:\\ \\ Program Files \Common Files \ Mysrosoft Shared\DAO \DAO35.HLP
OpenRecordset方法
< p class = T>创建一个新的 Recordset 对象并将其追加到记录集集合。
语法
设置 记录集 = 对象 .OpenRecordset( source , 类型 , 选项,lockedits )
对于 QueryDef , Recordset , TableDef 对象:
设置 记录集 = object .OpenRecordset (键入 , 选项,lockedits)
OpenRecordset 方法语法包含以下部分。
Part
描述
记录集
对象变量 表示要打开的 Recordset 对象。
对象
一个对象变量,表示要从中创建新记录集。
source
A 字符串 指定记录的来源新的 Recordset 。源可以是表名,查询名称或 SQL语句 。对于 Microsoft Jet数据库 ,源只能是表名。
type
< td class = T width ="75%">可选。一个常量,指示要打开的 Recordset 的类型,如"设置"中所指定。
期权
可选。指定新 Recordset 特征的常量组合,如设置中所列。
lockedits
可选。一个常量,用于确定 Recordset 的锁定,如"设置"中所指定。
What are the parameters for db.OpenRecordset?
I take it you are referring to the DAO's (Data Access Objects) OpenRecordSet Method. See below for the parameters.
You can also view the DAO help file complete with method call syntax and examples in either 1 of your local folders (depending on what version of DAO / Office you have installed.).
Location 1: C:\Program Files\Common Files\Microsoft Shared\Office10\1033\DAO360.CHM
Location 2: C:\Program Files\Common Files\Microsoft Shared\DAO\DAO35.HLP
OpenRecordset Method
Creates a new Recordset object and appends it to the Recordsets collection.
Syntax
For Connection and Database objects:
Set recordset = object.OpenRecordset (source, type, options, lockedits)
For QueryDef, Recordset, and TableDef objects:
Set recordset = object.OpenRecordset (type, options, lockedits)
The OpenRecordset method syntax has these parts.
Part Description recordset An object variable that represents the Recordset object you want to open. object An object variable that represents an existing object from which you want to create the new Recordset. source A String specifying the source of the records for the new Recordset. The source can be a table name, a query name, or an SQL statement that returns records. For table-type Recordset objects in Microsoft Jet databases, the source can only be a table name. type Optional. A constant that indicates the type of Recordset to open, as specified in Settings. options Optional. A combination of constants that specify characteristics of the new Recordset, as listed in Settings. lockedits Optional. A constant that determines the locking for the Recordset, as specified in Settings.
这篇关于OpenRecordset VBA参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!