|
- Private Sub Receive_Status_AfterUpdate()
- If MsgBox("是否进行收货?", vbInformation + vbYesNo) = vbNo Then
- Me.Receive_Status = False
- Exit Sub
- End If
- Dim SQLText As String
- Dim Step As Integer
- Step = 1
- SQLText = "INSERT INTO [tblStockIn/Out_Remote] ([item], [Date], In_Out, [ID Motive], Quantity,Price,Total_Value)"
- SQLText = SQLText + "SELECT Forms![frmPurchase_Order]![SubPo].Form![item] AS [item], date(), AS [Date], 'I' AS [IN_Out], '03' AS [ID Motive], Forms![frmPurchase_Order]![SubPo].Form![Qty_receive] AS [Quantity],Forms![frmPurchase_Order]![SubPo].Form![Price] AS [Price],Forms![frmPurchase_Order]![SubPo].Form![Total_Value] AS [Total_Value] ;"
- DoCmd.RunSQL SQLText
- Step = 2
- SQLText = "UPDATE [tblProduct_Stock_Remote] SET [tblProduct_Stock_Remote].[Real_Qty] = Forms![frmPurchase_Order]![SubPo].Form![Qty_receive]+[tblProduct_Stock_Remote]![Real_Qty]WHERE ((([tblProduct_Stock_Remote].[ITEM])=Forms![frmPurchase_Order]![SubPo].Form![item]));"
- DoCmd.RunSQL SQLText
- Me.Receive_Status.Locked = True
- End Sub
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|