Save query results to another table

S

stvlai

Hi

I have 2 Tables. Table A & B and a Form F

I query Table A and display Field 1,2,3,4 to a Form F on Screen + save
Field 1 & 2 to Table B.

How would I go about doing this in Access? Any help would be very much
appreciated. Thanks

SLKW
 
D

Douglas J. Steele

Why would you want to store data redundantly? If it's already in Table A,
why put it in Table B as well?

If you do have a legitimate requirement, your only way would be to use a
query behind the scenes.
 
B

BruceM

There is no need. It sounds as if your queries are giving you the
information you need. If not, more details are needed about the database
structure and the real-world situation behind the database.
 
K

Kulwinder Randhawa

stvlai said:
Hi

I have 2 Tables. Table A & B and a Form F

I query Table A and display Field 1,2,3,4 to a Form F on Screen + save
Field 1 & 2 to Table B.

How would I go about doing this in Access? Any help would be very much
appreciated. Thanks

SLKW
 
S

stvlai

Hi

Thanks for the reply. I knows this sound kind of redundant but I need
some info how to do this.

If I use the Insert Into command, can I reference the field in the
current form display (Append query)? e.g

INSERT INTO tbl_T2 (Order_id, Serial_no, RMA_No)

SELECT [Forms]![F1].order_id, [Forms]![F1].Rma_No

FROM [Forms]![F1];

Any info would be very much appreciated. Thanks

SLKW
 
B

BruceM

Since you are determined to save data redundantly, I don't think you can do
it as you describe. Rather, the SELECT statement references a table and
fields, then there would be a WHERE statement that can reference a field on
the form:

INSERT INTO tbl_T2 (Order_id, Serial_no, RMA_No)
SELECT OrderID, SerialNum, RMA_No
FROM Table1
WHERE OrderID = Forms!F1!OrderID;

I expect there is no need to do this. As Douglas and I have pointed out,
you can get the data any time you want by using a query. Very likely you
are creating problems for yourself down the road.

Hi

Thanks for the reply. I knows this sound kind of redundant but I need
some info how to do this.

If I use the Insert Into command, can I reference the field in the
current form display (Append query)? e.g

INSERT INTO tbl_T2 (Order_id, Serial_no, RMA_No)

SELECT [Forms]![F1].order_id, [Forms]![F1].Rma_No

FROM [Forms]![F1];

Any info would be very much appreciated. Thanks

SLKW
 
H

hor vannara

stvlai said:
Hi

I have 2 Tables. Table A & B and a Form F

I query Table A and display Field 1,2,3,4 to a Form F on Screen + save
Field 1 & 2 to Table B.

How would I go about doing this in Access? Any help would be very much
appreciated. Thanks

SLKW
 

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