Copying record to another table

R

roccogrand

I need to copy the record on a form to another table. I have tried various
versions of this statement both with and without brackets and parentheses
around the field names:

DoCmd.RunSQL ("INSERT INTO tblMembers (First , Last) SELECT Me.First ,
Me.Last")

The field names in both tables are the same. Access knows the correct
values on the form because Debug.Print shows the values. The statement above
is a valid parameter query but I want the values on the form to be copied
into the destination table "tblMembers".

What am I doing wrong?

In Access 2007.

Thanks.

LDN
 
P

PJFry

Try this:

DoCmd.RunSQL ("INSERT INTO tblMembers (First, Last) VALUES ('" & Me.First &
"','" & Me.Last & "')")

PJ
 
R

roccogrand

Thank you.

I must have wasted two hours last night trying to figure it out.

LDN
 

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