Delete records from table

  • Thread starter Syphonics via AccessMonster.com
  • Start date
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top