|
'链接后台数据(即创建链接表)
Public Function LinkData(PathName As String, Optional Password As String) As Boolean
On Error GoTo Err_LinkData
Dim intI As Integer
Dim tdf As Object
Dim strPassword As String
Dim clsGuage As New clsProcessBar
If PathName = "" Then Exit Function
gintTablesCount = 2
ReDim gstrSourceTableName(1 To gintTablesCount)
ReDim gstrLinkTableName(1 To gintTablesCount)
gstrSourceTableName(1) = "USysOperateLog"
gstrSourceTableName(2) = "USysErrorLog"
gstrLinkTableName(1) = "登录/操作日志"
gstrLinkTableName(2) = "错误日志"
'如果没有指定新表名,则使用源表名作为链接表名
For intI = 1 To gintTablesCount
If Trim$(gstrLinkTableName(intI)) = "" Then gstrLinkTableName(intI) = gstrSourceTableName(intI)
On Error Resume Next
'删除原来的链接表
DoCmd.DeleteObject acTable, gstrLinkTableName(intI)
On Error GoTo Err_LinkData
Next
我只保留操作日志和错误日志,在用户D盘的后台数据里,其他表我是链接到公用备盘的,可以这样试试。。。 |
|