Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Insert a record into a Recordset 1

Status
Not open for further replies.

Iainkerr01

Technical User
Aug 8, 2007
12
GB
Hi

I am using a recordset to create an emailing system. Having written the email to the first of many recipients using a loop on the first recordset, I want to insert a confirmation to a second table with the date and email title, which is set up as a second recordset.

Can anyone point me in the right direction?

Many thanks
 
You can either use

Code:
rs.AddNew
rs.Fields("Field1") = strValue
rs.Fields("Field2") = intValue
rs.Update

or use an SQL insert statement to add the value to the table.

CurrentDB.Execute "Insert into Fieldname (Field1, Field2) Values ('" & strValue & "', " & intValue & ")"

John


 
Hi John

You're a star!! I used the "Code" method and it works a treat. Vary many thanks for your prompt reply.

Iain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top