S
Syphonics via AccessMonster.com
Currently I had a order form which has a textbox name outstanding. Whenever
textbox "Outstanding" = "Paid" and textbox "PaymentMethod = "Cash", it will
insert information from the order form into table name "Transactions".
strFound = DLookup("[Description]", "Transactions", "[Description] = ' " & Me.
[CustomerID] & " , CNO:" & Me.[ChequeNumber] & " , Inv No:" & Me.[InvoiceID]
& " ' ")
If (Len(strFound) >= 1) Then
MsgBox "This invoice has been recorded "
Exit Sub
End If
If (Outstanding = "Paid") And (PaymentMethod = "Cash") Then
Amount = "INSERT INTO Transactions (Deposit, Description, Tdate, Account)
VALUES (" & Me.[AmountPaid] & ", ' " & Me.[CustomerID] & " , CNO:" & Me.
[ChequeNumber] & " , Inv No:" & Me.[InvoiceID] & " ', " & Chr$(39) & Me.
[PaymentDate] & Chr$(39) & ", ' Payments ');"
CurrentDb.Execute Amount
End If
Now I would like to make the record from the table "Transactions" be deleted
when I update the textbox "outstanding" to outstanding.
Is it possible to be done?
textbox "Outstanding" = "Paid" and textbox "PaymentMethod = "Cash", it will
insert information from the order form into table name "Transactions".
strFound = DLookup("[Description]", "Transactions", "[Description] = ' " & Me.
[CustomerID] & " , CNO:" & Me.[ChequeNumber] & " , Inv No:" & Me.[InvoiceID]
& " ' ")
If (Len(strFound) >= 1) Then
MsgBox "This invoice has been recorded "
Exit Sub
End If
If (Outstanding = "Paid") And (PaymentMethod = "Cash") Then
Amount = "INSERT INTO Transactions (Deposit, Description, Tdate, Account)
VALUES (" & Me.[AmountPaid] & ", ' " & Me.[CustomerID] & " , CNO:" & Me.
[ChequeNumber] & " , Inv No:" & Me.[InvoiceID] & " ', " & Chr$(39) & Me.
[PaymentDate] & Chr$(39) & ", ' Payments ');"
CurrentDb.Execute Amount
End If
Now I would like to make the record from the table "Transactions" be deleted
when I update the textbox "outstanding" to outstanding.
Is it possible to be done?