Copy from one table to another.

mircho

Registered User.
Local time
Today, 10:38
Joined
Jul 28, 2013
Messages
11
Hi all, I am facing the following problem: in my program I have several tables and I need to copy the data from one table to another. What I need to do is primary to filter the data from one of the tables (which I have already done using form and query) and what I need is to save those records to another table at once. Lets say I have filtered 3 columns (A, B and C) from table 1, that gives me as a result of 10 rows of records in the form. I need a button that on click will save those records to tabled 2 in columns A1, B1, C1.
What I was told was to use "Create a Record In" macro action but I think there is now such action, or at least my access does not have it.

Can anyone help me?
 
I need to copy the data from one table to another.

Why? It is an odd requirement.

If that is really what is required you could just convert the select query to an insert query.
 
1. Open your 1st Table and Select create Query
2. Make the type of query an append query and select the table to wish to add records to.
3. In the query menu add all the field you wish to be in table 2 to the feild rows
4. Select your table 1 in the table row.
5. Adding filters can be done serveral ways.
1. a simple text filter can be done by wraping quotes around text "Your Text"
2. Or what I like doing is using a form to select the filter. In that case use the format [Forms]![YourFormName]![FeildNameOnForm]


And there you go
 
Sorry, I could not reach my computer recently. I tried Append Query but it gave me a mistake as a result (I have attached a screen shot). To give some more clarifications: I have 1 table with basic data, and another table with more specified data. I have 3 columns in the first table and more than 10 in the second. The first 3 columns of the second table are the same as the 3 in the first. I need to filter the data and insert only the filtered data in the 3 columns in the second, and later to populate the other columns with the relevant data.
 

Attachments

  • Error.jpg
    Error.jpg
    47.8 KB · Views: 143
The first 3 columns of the second table are the same as the 3 in the first.
Why ? Seems that your database is not normalized.
 
Well, it might look wired but it is normalized. For the purpose of the database this is needed. Anyway I managed to do this, but now I am facing another problem. In the forth column in the second table has to bee assigned specific date. What I mean is that when i filter lets say 50 records, I want to enter the date in one field in the form I use and on a click to update the date in all the records.
 
This should be quite simple by using an Update Query.
 

Users who are viewing this thread

Back
Top Bottom