Dim objAccessAs Access.Application On Error Resume Next Set objAccess = New Access.Application objAccess.OpenCurrentDatabase "d:\data.mdb"'假设你的ACCESS文件是在D盘 objAccess.Visible = True objAccess.DoCmd.OpenForm "CoachM"'这是你要打开的窗体 (1).SetFocus
Private Sub Command1_Click()
Dim objAccessAs Access.Application On Error Resume Next Set objAccess = New Access.Application objAccess.OpenCurrentDatabase "d:\CoachM.mdb" objAccess.Visible = True objAccess.DoCmd.OpenForm "CoachM" (1).SetFocus
End Sub