'ÕýÔÚתÈëпâ´æ
If Me![תÈë¿â´æ] Then
If IsNull(Me![½ÓÊÕÈÕÆÚ]) Then
Me![½ÓÊÕÈÕÆÚ] = Date
End If
If ¿â´æ.GetQtyOnBackOrder(ProductID) > 0 Then
If MsgBoxYesNo(FillBackOrdersPrompt) Then
¿â´æ.FillBackOrders ProductID
End If
End If
'ÕýÔÚɾ³ýÒÑתÈëµÄ¿â´æ
Else
If InventoryID > 0 Then
Me![תÈë¿â´æ] = True
End If
End If
Done:
Exit Sub
ErrorHandler:
' µ÷ÊÔʱ½«»á»÷ÖÐ Resume Óï¾ä
If eh.LogError("Posted_To_Inventory_AfterUpdate") Then Resume
End Sub
Private Sub Date_Received_AfterUpdate()
If Me![תÈë¿â´æ] Then
Debug.Assert False
ElseIf MsgBoxYesNo(PostReceivedProductPrompt) Then
Me![תÈë¿â´æ] = True
Posted_To_Inventory_AfterUpdate
End If
End Sub
Private Sub Form_Current()
Me.AllowEdits = Not Me![תÈë¿â´æ]
End Sub
Private Sub Form_Load()
Dim rsw As New ¼Ç¼¼¯·â×°³ÌÐò
With rsw.GetRecordsetClone(Me.Recordset)
'È·±£¿â´æתÈëµÄÍêÕûÐÔ
While Not .EOF
If Not IsNull(![¿â´æ ID]) Then
rsw.Edit
![תÈë¿â´æ] = True
rsw.Update
End If
rsw.MoveNext
Wend
End With
End Sub