G
Guest
good day.
i am trying to find the amount paid on a transaction previous to a certain
transaction i wanted to find on certain table opened using ADODB recordset....
-------------
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.Open "Select TransactionID,MonthlyBillID,AmountPaid from [Customer
Monthly Bills] where TransactionID=" & TransactionID & " ORDER BY
MonthlyBillID", CurrentProject.Connection
If rst.EOF Then
MsgBox "No past transactions found from this customer", vbCritical,
"Customer Monthly Bills Entry Form"
Else
rst.movefirst
rst.Find "MonthlyBillID = " & MonthlyBillID, , adSearchForward, 0
rst.moveprevious
PreviousAmount = rst.fields.item(2).value
End If
rst.Close
Set rst = Nothing
i am trying to find the amount paid on a transaction previous to a certain
transaction i wanted to find on certain table opened using ADODB recordset....
-------------
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.Open "Select TransactionID,MonthlyBillID,AmountPaid from [Customer
Monthly Bills] where TransactionID=" & TransactionID & " ORDER BY
MonthlyBillID", CurrentProject.Connection
If rst.EOF Then
MsgBox "No past transactions found from this customer", vbCritical,
"Customer Monthly Bills Entry Form"
Else
rst.movefirst
rst.Find "MonthlyBillID = " & MonthlyBillID, , adSearchForward, 0
rst.moveprevious
PreviousAmount = rst.fields.item(2).value
End If
rst.Close
Set rst = Nothing