Passing data through a form from one table to another

M

Michael Nol

Hi

I want to be able to pull some data from one table into a form (this is
working fine via a query) add some more information and save it to a
different table than it originally came from.

I'm finding this very hard to explain but if anyone can help it would be
much apprediated.


Mike
 
G

Graham R Seach

Michael,

It seems to me that you simply need to use two queries; one to get the data,
and one to save it. You already seem to know how to get the data using a
SELECT query (presumably into a recordset), but to store the data in another
table, you need to either use another recordset with the
rs.AddNew/rs.Insert...rs.Update construct, or use DoCmd.Execute to run an
update or insert query.

CurrentDb.Execute "INSERT INTO tblTable (field1, field2) VALUES ('abc',
123)", dbFailOnError

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html
 

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