Writing record to table

J

Jason

I want to use the after update event to transfer data from
an unbound text box and three other fields on a form into
a new record of a table.

What's the code for this action?

Thanks in advance,

Jason
 
R

Ruskin Hardie

Try something like;

DoCmd.Setwarnings False
DoCmd.RunSQL "INSERT INTO
([Field One]," & _
"[Field Two],[Field Three],[Field Four]) VALUES (" & _
"'" & unbound_text_box.value & "','" & field_one.value & _
"','" & field_two.value & "','" & field_three.value & "');"
DoCmd.Setwarnings True
 

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