Writing to a table

WSC

Registered User.
Local time
Yesterday, 22:59
Joined
Nov 16, 2006
Messages
19
I would like to write records to a table from VBA code. Any suggestions?

I am looping through data in a table in my code and I would like the output of that to be written to a table. I am struggling with the syntax. Source is PPEW_Data and the destination is Output.

thanks
 
Open your Output table in a recordset then use the add new method , fill in the fields, and use the update method.
 
I had a devil of a job finding this -
eventual found a coding that does this (whenever i asked about this it was use the addnew but never how to actual do it - so heres the coding
rename the tables and fields etc (I've also left in a combo value in case you need that bit)

Dim dbs As DAO.Database
Dim letterhistory As DAO.Recordset
Set dbs = CurrentDb
Set letterhistory = dbs.OpenRecordset("letterhistory")

With letterhistory
.AddNew
!QteNo = Me.QteNo
!lettername = Me.Combo48.Column(2)
!Paraheading1 = Me.Paraheading1
 

Users who are viewing this thread

Back
Top Bottom