473,549 Members | 5,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Append a record from one table to another. Then delete initial record

1 New Member
I am trying to move data from one table to another. I have 2 codes that work right now... One to copy the data I want from one table to the other and one to delete data from a table. Is there any way I can get this to work as one whole process or do I need to run these seperatly?

INSERT INTO SoldMotors ( NTS, Make, Model, Grade, Date_Sold, Account, Invoice, Sold_Price, Core, Warranty, Lead )
SELECT Master.NTS, Master.Make, Master.Model, Master.Grade, Master.Date_Sol d, Master.Account, Master.Invoice, Master.Sold_Pri ce, Master.Core, Master.Warranty , Master.Lead
FROM Master
WHERE (((Master.Sold) ="Yes"));

and this is my delete.

DELETE Master.NTS, Master.Make, Master.Model, Master.Grade, Master.Date_Sol d, Master.Account, Master.Invoice, Master.Sold_Pri ce, Master.Core, Master.Warranty , Master.Lead, Master.Sold
FROM Master
WHERE (((Master.Sold) ="Yes"));
Aug 20 '10 #1
0 884

Sign in to post your reply or Sign up for a free account.

Similar topics

3
7807
by: Maria | last post by:
Is there another way to delete the current record in a subform from the main form, another subform or a sub-subform other than setting focus on a field in the subform and using run command acCmdDelete Record? Thanks! Maria
4
7836
by: Susan Bricker | last post by:
I have a command button on a form that is supposed to Delete the record being displayed. The record is displayed one to a form. The form is not a Pop-Up nor is it Modal. Tracing the btnDelete event routine shows that AllowDeletions is TRUE. When the Delete button is clicked (without TRACE ON), I get a 'beep', the recordselector (vertical...
1
4286
by: travismorien | last post by:
I have four tables of different "entities". One table contains information for "people", one for "trusts", one for "companies" and one for "self managed super funds". Each type of entity has an autonumber ID, "Person ID" "Trust ID" "Company ID" and "SMSF ID" A "portfolio" table holds information about what shares, funds and properties...
3
3363
by: Darin | last post by:
This is something that on the surface seems like it should be simple, but I can't think of a way to do this. I have a table that is a list of "jobs", which users create and use. It has a single autonumber key field. Within a job, there can be multiple orders. Logically, there'd be an orders table that is a child of the job table. This...
2
1545
by: MLH | last post by:
DELETE tblPreliminaryVINs.* FROM tblPreliminaryVINs INNER JOIN tblVehicleJobs ON tblPreliminaryVINs.PVIN = tblVehicleJobs.SerialNum; The above SQL does not work for me. I get an error I cannot delete the record(s) because of READONLY and PERMISSIONS related issues. I can hilite (select) the record in the table and delete it. I can use the...
4
7351
by: Akinyemi | last post by:
I am currently using Visual Basic 6 to write a Payroll Program. I created a Database with one Table in Microsoft Access that ships with Office 2000. The name of the Database is "Payroll", and the name of the Table is "Emoluments". I then usedcActiveX Data Control (ADO) to connect the Text Box controls on the Form to the Table. I have the...
2
2883
by: Hph | last post by:
I have a repeating problem that I have been able to fix in the past only one way. I get a record that turns from 'english' to "foreign symbols" and then I cannot edit or delete that record. The way I have gotten around it before is to make a copy of the table (structure only) and then copy and pasted the good records into it. Then I was...
3
2510
by: blakerrr | last post by:
Hi All, I have a strange situation that I can't figure out. The task is quite simple, delete a record from a table. Here is my situation: I have a form called Order Create which cycles through the parts in my database, run off of a table called Master BOM. In this form there is a subform called Order Data (not linked to the main form)...
3
1900
by: Constantine AI | last post by:
Hi i am trying to DELETE a Record if the details do not exist within a table. Here is my code below; Dim strSQL As String Dim strSQL2 As String Dim Reply As String Dim db As Database Dim rst As Recordset Dim SeqItemNo As Integer DoCmd.SetWarnings False
10
1775
by: hedges98 | last post by:
Hello After spending my morning search for a solution to what I need to do, I am a little stuck on which direction to take. Here is the scenario - I have a database that contains information on clients (tblClient) along with their appointment information (tbl1stAppointment, tbl2ndAppointment etc). A client can access the service as many...
0
7723
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7962
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7814
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6050
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5373
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3504
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1949
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1063
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
769
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.