SQL INSERT Statement in MS Access

B

Burt

Hi,

I'm trying to insert a record into a MS Access Table. I
generally use "Set MyTable = CurrentDB.OpenRecoordset
(SELECT * FROM MyTable)" to open the table, then use
Addnew to update the table with a new record. However, I
know I can use the INSERT SQL statement, but cannot seem
to get the syntax right.

If anyone knows the correct syntax, please share knowledge.

Thanks,

Burt
 
K

Ken Snell [MVP]

This is a generic way to do what you seek.

INSERT INTO MyTable (Field1, Field2, Field3, Field4 )
SELECT Value1, Value2, Value3, Value4;
 
B

Burt

Ken,

Thanks,

Burt
-----Original Message-----
This is a generic way to do what you seek.

INSERT INTO MyTable (Field1, Field2, Field3, Field4 )
SELECT Value1, Value2, Value3, Value4;


--

Ken Snell
<MS ACCESS MVP>




.
 

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