Delete records from table

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?

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200710/1

0
Syphonics
10/29/2007 9:20:42 AM
access.formscoding 7493 articles. 0 followers. Follow

0 Replies
499 Views

Similar Articles

[PageSpeed] 2

Reply:

Similar Artilces:

It takes time to load records in MS CRM Client
HI All, I am facing a serious problem, whenever i access CRM through Client, it takes time to load and after getting records in it, it is not shown properly. Why so??? please help me out. Client is always connected to server, Is there any way to check if it is connected or not. Thanks in Advance. Nitin Verma Nitin, I had the same issue with a client of mine and after working through all of the standard MS suggestions we found that by removing the clients local OST file and recreating it from the exchange server the issue was resolved. MS informed us of 2 items. 1) Having more then 1,000 e...

deleting a mailbox and recreating it again
Hi, I exmerged the wrong wayfrom a pst file into a mailbox and I want to start over again from scratch. I was thinking about going into to Active Directory , select the user , select Exchange Tasks , and select "Delete Mailbox" and then after deleting the mailbox create it again by going to Exchange Tasks, select "Create Mailbox". Will this create a whole new empty mailbox for me to import my email messages from the pst file again? Thanks. Peter Yup. That will work. "Billyboy" <peter@visors.com.hk> wrote in message news:%236xr8lHhEHA.904@TK2MSFTNGP...

How do I prevent someone from deleting a workbook?
When I protect a workbook so that users cannot modify it without knowing the password, what prevents the user from doing the following: 1. Open the workbook in read-only mode (I do want others to be able to read the workbook). 2. Select save as and give the file a new name. 3. Delete the original (password protected) workbook. 4. Rename the new (unprotected workbook) to the name of the original workbook. 5. Edit the workbook and then save the changes. 'Cause when you save the protected workbook, it also saves the protection. Even when it is renamed, the protection remains. -- Mic...

delete email directly from Unread Folder
Deleting email from Outlook 2007 is random. 2003 version could delete any email in this Folder, while 2007 capability appears random. Any ideas?? it should delete it just as it did in Outlook 2003. Try deleting the folder and restoring it (right click on the search folder and choose new.) -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com/ Outlook Tips by email: mailto:dailytips-subscribe-request@lists.outlooktips.net EMO - a weekly newsletter about Outlook and Exchange: mailto...

pivot table help!
I need some help with an issue I cannot seem to solve! I have a pivot table in Excel that is based off of a data input sheet. The data changes every month and the pivot table is always linked to the specific data tab. When the underlying data changes, the "old data" still displays as options to check in the pivot table. The refresh option does not seem to fix this, nor does the "Save data with table layout" option. I only want the options to check to be current data. For example, my data sheet only has data for July and August, but the pivot table has options to check...

How do i activate the Macro recorder toolbar
While recording a macro, I accidently closed the macro recorder toolbar .. Now whenever I record a macro, the recording toolbar does not appear. there fore I have to use the menu option to stop recording the macro. Also I cannot use relative and absolute reference. Can you please let me know how I can activate my macro recorder toolbar to appear the moment start recording my macro. Thanks --- Message posted from http://www.ExcelForum.com/ Tools>Customize>Toolbars. Select "Stop Recording" toolbar and "Reset". Put a check in the checkbox. Stop Recording Toolb...

Tables not changing in GP
I have created a GP add-in. The latest version of this app uses 5 new tables, which are created by a process run at "Startup". The tables are created fine in SQL Server, along with the appropriate permissions. My problem is that the resources (Tools > Resources > Tables) for my product still show an old table (which has been renamed in the app) and does not show the new table. Both the changed table and the new one are in the same Table Group as the other tables and they are all in the same series (Purchasing). Before installing my nw chunk I have deleted the old dict...

How do you bulk delete bad email addresses?
I have a client that uses an outside company to send bulk email. That company gave my client a list of dead email addresses in their CRM 4.0 database. Is there a bulk way to take that list of bad email addresses, locate the accounts they are associated with, and then remove those bad emails from their respective accounts in one fail swoop? Or do I have to touch each account? ...

this record can not be deleted
cant delete test records that ive created,error message its associated with another record. attempted to delete previous associated record, no luck. can i clean out old records? looking for options i have quotes, orders and invoices that are linked together.(test runs) i can't delete some of them via the user interface. I assume this is for history integrity. I would reinstall, except for the pain it took getting my contacts and accounts in. I have the same problem. I added some custom fields into the contact table and now I can't delete it. It tells me the data is part ...

Deleting data entries but not formats
Hi newsgroup, I have some trouble with excel... and with a document which I use for serial mails via Mail Merge. Now I need to clean all old data entries and prepare it for the next use. But if I simply delete the entries or do it via Clear-Entries then I have problems because conditional formatting will also be deleted and furthermore the mail merge cant work anymore because some fields are not found anymore. Does someone know how I can only delete the data entries, nothing else? The Mail merge runs via SQL and I'm not quite good in it... Thanks a lot in advance and a nice weeken...

Delete info
How do I delete all my contact info and calendar info to start from scratch? in calendar, go View/Current View/All Appointments then go Edit/Select all then press delete for contacts, just Edit/Select all then delete "Don" wrote: > How do I delete all my contact info and calendar info to start from scratch? Do you want to keep your email or not? You can start fresh with a new PST file, removing the old one. It will have nothing in it. That way if you ever do need a contact or calendar info from that original PST file, you don't delete it. I can't tell y...

make a duplicate table in access and save changes
I have a table that gives the rates of Dearness Allowance.These rates are given for different periods in percentages. ex: 01-01-2009 to 30-06-2009 37% 01-07-2009 to 30-11-2009 45% etc.. This is the default table and is applicable to almost 95% to 97% of employees. I want to make a duplicate of this table and display it in an unbound subform ( which is a continuous form). If the user makes any changes in it, it is then clear that Default rates are not applicable to him. Then, i want to store the data in a new table tblDeviations where i will store the EmployeeId also ...

deleting a fields content
I have a situation in which a user will need to delete only the content of one field for a record. For each record in the table there is a column (field) called IsChildOf. On the webpage there will be a button that will delete only the content (a number) of the field IsChildOf for the record. So, if record ID 449945 has 25 in the IsChildOf and the person uses the delete button, the 25 is deleted. How is the DELETE statement constructed for something like that (I'm a noob to sql)? Thanks. John John > On the webpage there will be a button that will > delete onl...

Is there a way to know when a Contact Record was created?
Is there a way or place to see when a Contact Record was created? I used to us ACT and part of the Properties or General Info automatically recorded the Creation Date for that Contact. It was very useful info to purge my Data Base of Old Inquiries that never developed. "WIM4246" <WIM4246@discussions.microsoft.com> wrote in message news:93299CA1-AD1A-421D-8371-97DF1AE6BB03@microsoft.com... > Is there a way or place to see when a Contact Record was created? > > I used to us ACT and part of the Properties or General Info automatically > recorded th...

can accepting a meeting for one participant delete another
can accepting a meeting for one participant delete another ...

how to delete recent cocuments
imported yahoo address book, to many times. need to delete all but one. also, why do I get a new worksheet everytime I import to excell from yahoo? thank you, To delete duplicates..........Data>Filter>Advanced Filter. Check unique records and copy to another location. Why do you get a new worksheet every time you import from yahoo? Depends upon your import method. How are you currently doing it? Gord Dibben MS Excel MVP On Sat, 23 Jan 2010 06:44:01 -0800, donald <donald@discussions.microsoft.com> wrote: >imported yahoo address book, to many tim...

Cumulative totals from individual records
I have labor data for employees given by hours worked on a given day. Eg. Tom, 5-hrs, 5-Jan-2001 What I need is cumulative hours worked by month: E.g. Tom, 100-hours-to-date, Jan-2001 How can I use Access to generate cumulative-hours-to-date by month from hours-worked-on-given-days? Note: It’s something I could get from Excel Pivot table, but I have well over 60,000 records (in the millions). -- Richard Use a totals query to get the totals for a period (e.g. a month.) Then use a subquery to get the progressive total. The Year-to-date example should illustrate how: ...

Formatting Pivot Table- when doble clicking to show Detail
He there, Can I modified the format of the detail that I get once I doble click my pivot Table? Or Is there a way that once I dobleclick in my pivot table to obtain the detail, a macro can be fired to apply the format that I want?. ...

In Access 2007, how do I get a chart to reflect table data?
Am not sure how to get charts to reflect table data. It appears that you can create charts in forms and reports, and there's a chart wizard in which I select a table and fields, but the resulting chart does not have table data in it. Any suggestions? ...

Can you delete closed purchase orders?
Does anyone know if you can delete closed purchase orders? I inadvertantly made a purchase order that does not contain a supplier and I closed and comitted it but now I can not delete it. There is a setting in the configuration menu that will enable you to edit closed purchase orders. You will then be able to add the supplier. If you would still like to delete it, you could add another item to the PO and save it to make it a Partial, then receive them all to negative quantities (1 extra negative on one of the closed items, and 1 positive for the new item, so it will enable comitting. Aft...

Exchange folders gone missing deleted in Entourage
We've had 2 users in 3 days who all of a sudden noticed that all of the custom folders they created in their Exchange mailbox were gone. They didn't delete them, they weren't in the recover items area. Just gone. They are both on 11.2.1 (051004) for Entourage 2004 (SP2) and using mac 10.3.9 or 10.4.2 I use a mac and PC so i confirmed that their accounts were set up correctly. We have 3 domain controllers, but most macs are set to the same DC because Entourage can't pick and choose on it's own. Anybody have help? Restores are no fun. Check OWA reports them as missing ...

Run SSRS stored procedure report from a CRM 2011 for a current record
Hi All, we need to run a SSRS report created via stored procedure for the current record in a custom CRM entity . we completed creating stored procedure , but pre-filtering is not working . when we tried to preview in visual studio it is picking up the lastest record values only . Could any one give some suggestion to resolve this issue ? Thanks, Sandy ...

CRM 4.0: Deletion Service failed to clean up ...
Hey, On my CRM 4.0 server I get two errors in the applications event log about the MSCRMDeletionSErvice: 1) Error: Deletion Service failed to clean up table=CampaignActivityBase 2) Error: Deletion Service failed to clean up table=ActivityPointerBase The server is a clean install and not a upgrade. Does anyone know how to solve this?? Kind Regards, Mirella This worked for me one time. Use Advanced Find and enter a query for (in this case, Campaign) Then go back and delete it. I tried to get rid of it wit T-SQL commands but could not. There is a proceedure on partnersouce but it did ...

How can I recover a deleted contact from Entourage?
Version: 2004 Operating System: Mac OS X 10.5 (Leopard) Processor: Power PC Email Client: pop I accidently deleted a contact from my Entourage and now I want it. Is there any way to get it back with Data Rescue or some other data recovery tool? <FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12pt'>On 5/19/10 6:12 AM, in article <a href="59bb8b00.-1@webcrossing.JaKIaxP2ac0">59bb8b00.-1@webcrossing.JaKIaxP2ac0</a>, &quot;<a href="backpack_Jeff@officeformac.com">backpack_Jeff@officeformac.com...

new table from same data as report
Greetings, I hope this is the correct group, my question spans several topics. I have created a db from the Access 2000 time and billing wizard. Mostly it works ok. There are about a hundred peculiarities that I do not yet understand. But for now, this is the thing I have decided to work on. The db allows you to create an invoice from data that is displayed on a form from a form and some criteria info you provide. You click a command button and voila, a report with the same info. No real magic, but handy. What is missing from the template db is the real magic, a way to keep track...