View Full Version : easy sql question..


jkainth
11-06-2004, 12:12 PM
ms access
I have a empty table called ...'Table2' with 3 fields 'firstname', 'lastname', 'value'
i have another table called ...'Table1' with 2 fields 'firstname', 'lastname'
i have form with a textbox callled Text0

this is the query that i am having trouble with:

INSERT INTO Table2 SELECT Table1.firstname, Table1.lastname, Forms!Form1!Text0.text FROM Table1;

the query doesnot run, gives an error. The SELECT query works stand alone but not when in above.

P.S someone will ask me if the form was open and had a value and that it was open before the query was run...and the answer is yes

llkhoutx
11-06-2004, 01:22 PM
With your query:

INSERT INTO Table2 SELECT Table1.firstname, Table1.lastname, Forms!Form1!Text0.text FROM Table1;

Forms!Form1!Text0.text is not a field in Table1.