新增文章
文章标题
分类
C#
云星空
K3 BOS
K3 功能
用友
Oracle
python
SQL
MySql
PHP
HTML
script
windows
Access
影视后期
财务
服务
生活
内容
Dim aSelTop As Long, aSelCount As Long Private Sub 子窗体_Exit(Cancel As Integer) aSelTop = Me.子窗体.Form.SelTop '从第n行 开始选中 aSelCount = Me.子窗体.Form.SelHeight '共选中x行 End Sub Private Sub 追加_Click() Dim i As Long, aControls As Controls, aControl As Control Set aControls = Me.临时表子窗体.Form.Controls Me.临时表子窗体.SetFocus For i = 0 To aSelCount - 1 '逐行读取 Me.子窗体.Form.SelTop = aSelTop + i If Me.临时表子窗体.Form.NewRecord <> True Then DoCmd.RunCommand acCmdRecordsGoToNew '定位到 新增行 End If For Each aControl In aControls If aControl.ControlType <> acLabel Then aControl.Value = Me.子窗体.Form.Controls(aControl.Name).Value '逐个字段赋值 End If Next aControl Me.临时表子窗体.Form.Recalc Next End Sub
返回
保存