首先谢谢版主对我不厌其烦的教导 这是访问数据库的一个程序但是我运行的时候它出现这样的信息:
”实时错误‘3028’:
无法启动应用程序,工作组信息文件丢失,或是已被其他用户一独占方式打开。”
程序如下:
Sub test()
Dim daoWs As Workspace
Dim daoDb As Database
Dim daoRs As Recordset
Dim daoFields As Fields
Dim Recordvalue As String
Set daoWs = CreateWorkspace(",","admin","abuseJet")
Set daoDb = daoWs.OpenDatabase("序号")
Set daoRs = daoDb.OpenRecordset(" ")
set daoFields = daoRs.Fields
Recordvalue = daoFields(" ")
MsgBox("value": &"Recordvalue")
daoRs.Close
daoDb.Close
daoWs.Close
End Sub