Private Sub Form_AfterUpdate()
If IsNull(LOT) = False Then
Dim cn As New ADODB.Connection
Dim rss As New ADODB.Recordset
Set cn = CurrentProject.Connection
rss.Open "PRO_MOC_LOG_INSERT '" + RTrim(LOT) + "'", cn
'RSS.Open "PRO_MOC_LOG_INSERT '" + RTrim(LOT) + "','" + LEFT(RTrim(Text1), 13) + "'", CN
'CNN.Execute "PRO_INV_DETAIL '" & RTrim(Text0) & "', '" & RTrim(Text2) & "' "
If rss.Fields(0) = "1" Then
Beep
MsgBox "´ËLOT²»´æÔÚ", vbOKOnly, "¾¯¸æ"
Me.Requery
DoCmd.GoToRecord , , acNewRec
ElseIf rss.Fields(0) = "2" Then
Beep
MsgBox "´ËLOTµÄ?ÅcÑuÁî²»·û", vbOKOnly, "¾¯¸æ"
Me.Requery
DoCmd.GoToRecord , , acNewRec
ElseIf rss.Fields(0) = "4" Then
Beep
MsgBox "´ËLOTµÄÑuÁîÅcË¢ÑuÁî²»·û", vbOKOnly, "¾¯¸æ"
Me.Requery
DoCmd.GoToRecord , , acNewRec
ElseIf rss.Fields(0) = "3" Then
Beep
MsgBox "RLÖظ²Ë¢", vbOKOnly, "¾¯¸æ"
Me.Requery
DoCmd.GoToRecord , , acNewRec
Else
Me.Requery
DoCmd.GoToRecord , , acNewRec
End If
rss.Close
cn.Close
Set rss = Nothing
Set cn = Nothing
End If
End Sub |