using access for email campaigns - automatic date sent insertion?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I don't know if this is possible. I send out emails to targeted people who
have registered with my site via mail merge. Is it possible for Access to
insert a date in the database every time I select a record and merge it?
Currently, I have to manually insert the dates and it's extremely
time-consuming.
 
Lroberts said:
I don't know if this is possible. I send out emails to targeted people who
have registered with my site via mail merge. Is it possible for Access
to
insert a date in the database every time I select a record and merge it?
Currently, I have to manually insert the dates and it's extremely
time-consuming.

In your code, add a recordset update (air code):

Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strSQL As String

Set db = CurrentDb

strSQL= "Select DateField From YourTable Where ID = & Me.txtID" ' The ID
From your Email Form

Set rst = db.OpenRecordset(strSQL, dbOpenDynaset)

With rst
.Edit
!!DateField = Date ' Current Date
.Update
End With

Then clean up and close. If there are multiple records, use the Form's
RecordsetClone or the same query that returned your dataset as your strSQL.
 
Back
Top