Office中国论坛/Access中国论坛
标题:
关于复选框添加的问题
[打印本页]
作者:
dzh-1976
时间:
2010-6-15 10:15
标题:
关于复选框添加的问题
[attach]42446[/attach]请问如何将订单子窗体中的选定打勾的记录添加到冲压生产排程子窗体中。冲压按钮的代码现是这样的(这样写就全部添加过来了,不合要求):
Private Sub 冲压_Click()
With Me.订单.Form.Recordset
.MoveFirst
For X = 0 To .RecordCount - 1
Me.冲压生产排程.SetFocus
DoCmd.GoToRecord , , acNewRec
Me.冲压生产排程.Form![订单号] = Me.订单.Form![订单号]
Me.冲压生产排程.Form![瓶身] = Me.订单.Form![瓶身]
Me.冲压生产排程.Form![选择] = -1
Me.冲压生产排程.Form![数量] = Me.订单.Form![订单数]
Me.订单.Form![选择] = -1
.MoveNext
Next
End With
MsgBox Me.订单.Form.Recordset.RecordCount & "条记录追加成功!", vbInformation, "结果提示"
End Sub
作者:
tmtony
时间:
2010-6-15 11:21
判断一下
if Me.冲压生产排程.Form![选择框] <>0 then
执行插入工作
end if
作者:
dzh-1976
时间:
2010-6-15 12:01
还是不行啊,管理员,请问这句要放在哪?
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/)
Powered by Discuz! X3.3