473,782 Members | 2,531 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access append query...

3 New Member
How ccan append last entry form one table to another????
Jun 21 '07 #1
4 1869
tdw
206 New Member
How ccan append last entry form one table to another????
Create an append query. If you are trying to copy the record from Table1 to Table2, the SQL will look something like this:
Expand|Select|Wrap|Line Numbers
  1. INSERT INTO Table2
  2. SELECT Table1.*
  3. FROM Table1
  4. WHERE ((([Forms]![Formname]![Fieldname])=[Table1]![Fieldname]));
  5.  
Then if you want to delete the record from Table1 after copying it to Table2, create a delete query, which would like something like this:
Expand|Select|Wrap|Line Numbers
  1. DELETE Table1.*
  2. FROM Table1
  3. WHERE ((([Forms]![Formname]![Fieldname])=[Table1]![Fieldname]));
  4.  
Jun 21 '07 #2
Sakakini
3 New Member
Create an append query. If you are trying to copy the record from Table1 to Table2, the SQL will look something like this:
Expand|Select|Wrap|Line Numbers
  1. INSERT INTO Table2
  2. SELECT Table1.*
  3. FROM Table1
  4. WHERE ((([Forms]![Formname]![Fieldname])=[Table1]![Fieldname]));
  5.  
Then if you want to delete the record from Table1 after copying it to Table2, create a delete query, which would like something like this:
Expand|Select|Wrap|Line Numbers
  1. DELETE Table1.*
  2. FROM Table1
  3. WHERE ((([Forms]![Formname]![Fieldname])=[Table1]![Fieldname]));
  4.  

I tried what you have suggested and it create a new col. in the query. Maybe I was not clear in my quest for an answer to my question. Let me try again:
I have two tables, Table1 and Table2. Table1 has 5 fields out of which 2 fields I want to copy from table2. Here is my delima. when I enter new record into tablel I need to pick the 2 new fileds and append table1 by insurting these two fileds in a new record in table1.
Awaiting your advice....
Thanks,
Jun 21 '07 #3
tdw
206 New Member
I tried what you have suggested and it create a new col. in the query. Maybe I was not clear in my quest for an answer to my question. Let me try again:
I have two tables, Table1 and Table2. Table1 has 5 fields out of which 2 fields I want to copy from table2. Here is my delima. when I enter new record into tablel I need to pick the 2 new fileds and append table1 by insurting these two fileds in a new record in table1.
Awaiting your advice....
Thanks,
Yes, that is a little different than I was thinking. Unfortunately I don't quite understand exactly what you are trying to do. Maybe the answer to the following questions will help:

1. Are you entering data from a form, and what table is the form's control source?
2. How are you entering data into the other table? What is it's purpose?

Go ahead and give me specific table and field names so we can avoid using confusing nicknames for your fields.
Jun 21 '07 #4
stpark22
8 New Member
I tried what you have suggested and it create a new col. in the query. Maybe I was not clear in my quest for an answer to my question. Let me try again:
I have two tables, Table1 and Table2. Table1 has 5 fields out of which 2 fields I want to copy from table2. Here is my delima. when I enter new record into tablel I need to pick the 2 new fileds and append table1 by insurting these two fileds in a new record in table1.
Awaiting your advice....
Thanks,
If I'm understanding this correctly, it appears that you want to update certain fields in a table instead of adding a series of records to a table. If so, you must run an "Update" query. Here is a generic SQL statement illustrating this.

UPDATE Table1
INNER JOIN Table2
ON Table1.[JOIN KEY] = Table2.[JOIN KEY]
SET
Table1.[FIELD 4] = [Table2]![FIELD 1],
Table1.[FIELD 5] = [Table2]![FIELD 2];

Hope this helps...
Jun 22 '07 #5

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

Similar topics

2
15514
by: Fred | last post by:
Hi. How do I import while mapping an excel table to an access table please??? I've searched around and all I can find is a software product or code that does the same thing as the access wizard..... If I have to write vb code, where is a sample??? Or do I import the excel in to a new spreadsheet and then write some kind of querey to move the data from that table
2
5017
by: SenseForAll | last post by:
First please note I am a novice at VBA and not even that experienced with DAO/ADO and MS-SQL. Any assistance is appreciated. That said... I have an application written in Access w/ VBA. I need to get some data out of a SQL server and into an Access table. I don't know anything about the SQL server data model or structure. I don't have access rights to link to the SQL table. What I do have is the rights and information to run a stored...
6
4461
by: Jarrod | last post by:
I have multiple reports in one database, on one form. I need to know what reports were run when, and by Network User ID. How do I do that?
4
4466
by: Shahzad | last post by:
dear respected gurus, I would like to knew how to apply append,insert query for a self table where no primary keys issues. i do have problem say there are 5 rows of single record, this is data of motor under one policy. say policy is john2004, so john is owner of 5 cars. now on next year the card has got renew with same conditions(same amounts all), so i need to insert new recocrd via query in new policy is john2005, with same...
3
5588
by: Andy Davis | last post by:
I have set up a mail merge document in Word 2003 which gets its data from my Access 2000 database. I want to set up a button on a form that: 1. runs the query to provide the dat for the merge document in Word; 2. opens the document and runs the merge process for the new data. I have managed to write the code to perform step 1 ok, but I'm having trouble with step 2. It opens the word document fine but does not perform the mail merge of...
4
8225
by: cameron | last post by:
I have always been under the impression that LDAP was optimized for speed. Fast queries, fast access, slower writes. I have a block of data in LDAP and in SQL. Exact same data. The query is fast but the first access to the result set takes longer that to do the query in SQL and process the sql results. From my trace.axd LDAP Test Starting Search 0.000112 0.000043 LDAP Test Done Search 0.003821 0.003374 <--- fast query at .003 sec LDAP...
1
3890
by: jjjoic | last post by:
Hi, I use Access 2003 to generate the back-end data for a ColdFusion report at work. The report is sorted by a column and based on the sorting, rankings are assigned to each row(i.e. the biggest value gets No. 1, and then the row of the second biggest value is ranked as No. 2). Each task owners will then have to attack their owning issues based on the ranking. The No. 1, 2, 3,... rankings are generated in this way: 1. An...
3
3148
by: hikosj | last post by:
Hi all, I have a problem with a query in access that I cant seem to figure out. I have a form named frmRecruitment with a subform named sfrmParticipant. At the moment I am using an append query to append records from 'sfrmParticipant' to 'frmIntervention' using a button on a main form 'frmRecruitment'. This append query appends all the records from 'sfrmParticipant' to 'frmIntervention' but I only want to append the record that is...
13
3736
by: magickarle | last post by:
Hi, I got a pass-through query (that takes about 15 mins to process) I would like to integrate variables to it. IE: something simple: Select EmplID from empl_Lst where empl_lst.timestamp between !! And !! Not sure how to do so (should it be a query in Access or a macro) The connection would be ODBC.
0
1304
by: csin | last post by:
I have an Access DB backend for the application I am running, I want to use the built in ability in Access to remove duplicate entries... Say I have table1 with fields field1 field2 and field3, none of the fields are indexed without duplicates for a reason... The way I remove duplicates is to do an append query into an identical table that has one of the fields set to indexed no duplicates. If I run this query in Access directly I get a...
0
9639
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9479
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10146
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10080
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8967
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7492
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6733
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5509
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2874
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.