问题解决:
在事件过程里编码:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim conn As New ADODB.Connection
Set conn = CurrentProject.Connection
Dim rst As New ADODB.Recordset
Dim msg As String
Dim m As String
rst.Open "select * from tbljpig where jpuc='" & Me.jpuc & "'and jpp='" & Me.jpp & "'and rem='" & Me.rem & "'", conn, adOpenKeyset, adLockOptimistic
If rst.EOF Then
MsgBox "RODUCTION NULL!"
jpgb.SetFocus
End If
Set conn = Nothing
Set rst = Nothing
End Sub
同时多谢各位!尤其是cattjiu !
[此贴子已经被作者于2003-2-20 18:12:20编辑过]
|