vb数据库问题,求教各位大神
PrivateSubCommand2_Click()OnErrorGoToErr100CreateDatabase"采集信息数据库.mdb",dbLangGeneralE...
Private Sub Command2_Click()
On Error GoTo Err100
CreateDatabase "采集信息数据库.mdb", dbLangGeneral
Exit Sub
Err100:
MsgBox "不能建立数据库! " & vbCrLf & vbCrLf & Err.Description, vbInformation
Dim temstr As String, retstr As String
Dim Defdb As Database
Dim NewTable As TableDef
temstr = "请输入存档名"
retstr = InputBox(temstr, "保存", 1)
Set Defdb = Workspaces(0).OpenDatabase(App.Path & "采集信息数据库.mdb", 0, False)
Set NewTable = DefDataBase.CreateTableDef(restr)
End Sub
每次运行的时候都说找不到数据库mdb文件,但是我在文件夹里面看到有那个文件 展开
On Error GoTo Err100
CreateDatabase "采集信息数据库.mdb", dbLangGeneral
Exit Sub
Err100:
MsgBox "不能建立数据库! " & vbCrLf & vbCrLf & Err.Description, vbInformation
Dim temstr As String, retstr As String
Dim Defdb As Database
Dim NewTable As TableDef
temstr = "请输入存档名"
retstr = InputBox(temstr, "保存", 1)
Set Defdb = Workspaces(0).OpenDatabase(App.Path & "采集信息数据库.mdb", 0, False)
Set NewTable = DefDataBase.CreateTableDef(restr)
End Sub
每次运行的时候都说找不到数据库mdb文件,但是我在文件夹里面看到有那个文件 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询