技術(shù) 點(diǎn)
- 技術(shù)
- 點(diǎn)
- V幣
- 點(diǎn)
- 積分
- 243
|
Private Sub Incoming_Qty_AfterUpdate()
Dim conn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Set conn = CurrentProject.Connection
rst.CursorLocation = adUseClient
Dim co As String
Dim qty As Integer
rst.Open " select [A].[cust po] as co, [A].[QTY] as qty from [A] where ([A].[cust po]='" + Me.Cust_PO + "')", conn, adOpenStatic, adLockPessimistic
With rst
If Not rst.EOF Then
If IsNull(Me.Incoming_Qty) = False Then
If qty >= Me.Incoming_Qty Then
Me.Text18 = Me.Cust_PO
Me.Text20 = Me.Incoming_Qty
DoCmd.GoToRecord , , acNewRec
Me.Cust_PO = ""
Me.Incoming_Qty = ""
Else: MsgBox "數(shù)量超出"
Me.Text22 = qty
End If
Else: MsgBox "請(qǐng)輸入數(shù)量"
End If
End If
End With
rst.Close
End Sub
哪位大俠幫我看看,為啥qty一直顯示為0?謝謝! |
|