how to pull a record to a form and save it to another table

L

Lorraine

hi,
I want to pull data from more then one field ( as it seems with a combo
box with multiple fields listed in a row ) and have it save these fields to a
diffrent table. What I'm trying to do is take a Whole record and save that
record to a new table.

Thanks
L
 
D

Douglas J. Steele

Why? It's seldom a good idea to store redundant copies of data.

You can use an INSERT INTO query:

Dim strSQL As String

strSQL = "INSERT INTO TheOtherTable(Field1, Field2, Field3) " & _
"VALUES(" & Me.txtNumericField & ", """ & _
Me.txtTextField & """, " & _
Format(Me.txtDateField, "#\yyyy\-mm\-dd hh\:nn\:ss\#") & ")"
CurrentDb.Execute strSQL, dbFailOnError
 

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