Application.DBEngine 属性 (Access)
使用 Visual Basic 中的 DBEngine 属性访问当前 DBEngine 对象及其相关属性。 只读的 DBEngine 。
语法
表达式。DBEngine
expression:表示 Application 对象的变量。
备注
Application 对象的 DBEngine 属性表示 Microsoft Access 数据库引擎。 DBEngine 对象是数据访问对象 (DAO) 模型中的顶级对象,它包含和控制数据访问对象层次结构中的所有其他对象。
示例
下面的示例在一个消息框中显示 DBEngine 属性。
Private Sub Command1_Click()
DisplayApplicationInfo Me
End Sub
Function DisplayApplicationInfo(obj As Object) As Integer
Dim objApp As Object, intI As Integer, strProps As String
On Error Resume Next
' Form Application property.
Set objApp = obj.Application
MsgBox "Application Visible property = " & objApp.Visible
If objApp.UserControl = True Then
For intI = 0 To objApp.DBEngine.Properties.Count - 1
strProps = strProps & objApp.DBEngine.Properties(intI).Name & ", "
Next intI
End If
MsgBox Left(strProps, Len(strProps) - 2) & ".", vbOK, "DBEngine Properties"
End Function
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。