Hi,
I am using an MS Access 2010 table as a data source for a mail merge. I would like to update a field in the table with the date that the letter is printed. Is there a way to do this?
Thank you!
Hi,
I am using an MS Access 2010 table as a data source for a mail merge. I would like to update a field in the table with the date that the letter is printed. Is there a way to do this?
Thank you!
Certainly. Need code. The real trick is figuring out what event to put code into. I assume you have code that opens and prints the mail merge? Is that field already available on open form?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Thats tricky because just because you click print, doesnt mean the letter actually printed. So youd have to manually verify that the paper actually printed.
BUT
A manual MACRO in word:
If you have a select query you use in access that is the 'letter batch', then you could build a macro that uses an update query, that uses the 'Letter batch' query as the source, to mark them 'printed'.
Code:Public Sub UpdRST() Dim con As ADODB.Connection Dim rs As ADODB.Recordset Dim DB Dim vProvid Set con = New ADODB.Connection Set rs = New ADODB.Recordset uid = "HomerJSimpson" pwd = "" DB = "\\myserver\production\Generic104J.mdb" vProvid = "Microsoft.Jet.OLEDB.4.0" ' "SQLOLEDB" With con .Provider = "Microsoft.Jet.OLEDB.4.0" .Properties("User ID").Value = uid .Properties("Password").Value = pwd .Open "Data Source=" & DB End With con.Execute("quMarkNamesPrinted") rs.Close con.Close set rs = nothing set con = nothing End Sub
Hi,
I'm newish to this, so please bear w/me. I'm using the "Word Merge" from MS Access 2010 to link to an existing Word document.
Should I not be using the Word Merge Wizard?
Can if necessary. I've never used it. I build reports in Access.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.