Passing data through a form from one table to another

  • Thread starter Thread starter Michael Nol
  • Start date Start date
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
 
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
 
Back
Top