Table of contents
TOC
折叠目录
展开目录

CodeProject 对象 (访问)CodeProject Object (Access)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

CodeProject对象引用的 Microsoft Access 项目 (.adp) 代码数据库或 Access 数据库的项目。The CodeProject object refers to the project for the code database of a Microsoft Access project (.adp) or Access database.

注解Remarks

CodeProject对象具有多个包含特定代码数据库中的AccessObject对象的集合。下表列出了 Access 项目以及它所包含的对象类型所定义的每个集合的名称。The CodeProject object has several collections that contain specificAccessObjectobjects within the code database. The following table lists the name of each collection defined by Access project and the types of objects it contains.

集合Collections对象类型Object type
AllFormsAllForms所有窗体All forms
AllReportsAllReports所有报表All reports
AllMacrosAllMacros所有宏All macros
AllModulesAllModules所有模块All modules

请注意 前面的表中的集合包含所有无论数据库中的各个对象,它们是打开还是关闭。Note The collections in the preceding table contain all of the respective objects in the database regardless if they are opened or closed.

例如,一个AccessObject对象,它表示窗体是AllForms集合是在当前数据库中的AccessObject对象的集合的成员。在AllForms集合中从零开始索引集合中的单个成员。您可以通过引用窗体名称,或在集合中的索引引用AllForms集合中的单个AccessObject对象引用。如果要引用AllForms集合中特定的对象,最好到该名称引用,因为项的集合索引可能会更改。如果对象名中包含空格,名称必须用方括号 ([])。For example, an AccessObject object representing a form is a member of the AllForms collection, which is a collection of AccessObject objects within the current database. Within the AllForms collection, individual members of the collection are indexed beginning with zero. You can refer to an individual AccessObject object in the AllForms collection either by referring to the form by name, or by referring to its index within the collection. If you want to refer to a specific object in the AllForms collection, it's better to refer to it by name because a item's collection index may change. If the object name includes a space, the name must be surrounded by brackets ([ ]).

语法Syntax示例Example
AllForms窗体名称AllForms ! formnameAllForms!OrderFormAllForms!OrderForm
AllForms ![窗体名称]AllForms ![ form name]AllForms![Order Form]AllForms![Order Form]
AllForms("窗体名称")AllForms (" formname")AllForms("OrderForm")AllForms("OrderForm")
AllForms(窗体名称)AllForms ( formname)AllForms(0)AllForms(0)

方法Methods

名称Name
AddSharedImageAddSharedImage
CloseConnectionCloseConnection
OpenConnectionOpenConnection
UpdateDependencyInfoUpdateDependencyInfo

属性Properties

名称Name
访问连接AccessConnection
AllFormsAllForms
AllMacrosAllMacros
AllModulesAllModules
AllReportsAllReports
ApplicationApplication
BaseConnectionStringBaseConnectionString
ConnectionConnection
文件格式FileFormat
全名FullName
ImportExportSpecificationsImportExportSpecifications
IsConnectedIsConnected
IsTrustedIsTrusted
IsWebIsWeb
NameName
ParentParent
PathPath
项目类型ProjectType
属性Properties
RemovePersonalInformationRemovePersonalInformation
ResourcesResources
网站WebSite
IsSQLBackendIsSQLBackend

另请参阅See also

其他资源Other resources

Access 对象模型引用Access Object Model Reference

© 2018 Microsoft