介 绍:
制作了一个小示例,根据Office版本,来打开对应的Access数据库文件。
代 码:
Dim strPathName As String
strPathName = CurrentProject.Path
#If Win64 Then
strPathName = strPathName & "\【Access示例】64位Access文件.mdb"
#Else
strPathName = strPathName & "\【Access示例】32位Access文件.mdb"
#End If
Shell "explorer.exe """ & strPathName & """", vbNormalFocus
DoCmd.Quit
演 示:
附 件:
点击下载此附件