【发布时间】:2017-03-30 15:34:37
【问题描述】:
我有 2 个 Access 数据库文件。数据库编号1 在我的计算机和数据库中。 2 在网络共享文件夹中。
我在数据库 1(在我的计算机中)中创建了一个表单,它使用以下 VBA 代码将表单数据插入到表“Tbl_Requests”中:
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("Tbl_Requests")
With rst
.AddNew
.Fields("IDLeave") = Me.Text_IDLeave.Value
.Fields("PersonalCode") = Me.Text_CP.Value
.Fields("FullName") = Me.Text_FullName.Value
.Fields("RequestDate") = Me.Text_RequestDate.Value
.Fields("Section") = Me.Text_Section.Value
.Fields("SuperName") = Me.Text_SuperName.Value
.Fields("LeaveRemained") = Me.Text_LeaveRemained.Value
.Fields("Des") = Me.Text_Des.Value
.Fields("LeaveDate") = Me.Combo_LeaveDate.Value
.Fields("Email") = Me.Text_Email.Value
.Update
End With
现在我想将相同的数据表单保存到网络中数据库 2 中的另一个表中。我该怎么做?
【问题讨论】: