|
Private Sub Form_Load()
On Error GoTo me_error
Dim db As DAO.Database, dbtable As TableDef
Dim mypath As String
Dim i As Integer
'在状态栏中显示信息
Dim xx As String
Dim returnvalue
returnvalue = SysCmd(acSysCmdSetStatus, " ")
xx = "当前操作员:" & DBEngine.Workspaces(0).UserName & " 当前计算机:" & atCNames(2)
returnvalue = SysCmd(acSysCmdSetStatus, xx)
'增加需要导出的表
Set db = CurrentDb()
Me.tablelist.RowSource = ""
For Each dbtable In db.TableDefs
If (dbtable.Attributes And dbAttachedTable) Then
Me.tablelist.AddItem (dbtable.Name)
End If
Next
mypath = CurrentProject.Path & "\outputfile\"
txtmypath.Value = mypath
'禁止工具栏上第二,三,四,五按钮
Application.CommandBars("工具栏2").Controls(2).Visible = False
Application.CommandBars("工具栏2").Controls(3).Visible = False
Application.CommandBars("工具栏2").Controls(4).Visible = False
Application.CommandBars("工具栏2").Controls(5).Visible = False
myerror:
Exit Sub
me_error:
MsgBox Err.Description, vbCritical, "错误"
Resume myerror
End Sub
在ACCESS2000中报错:用户定义类型未定义
我认为是DAO.Database, dbtable As TableDef在2000中,不认。
我的帮助信息不全,哪可以下载。
|
|