Forgot to add in my source code i have been trying to use.
Private Sub Command88_Click()
On Error GoTo Err_Command88_Click
If IsNull([LName]) Then
MsgBox "Please Enter in Last Name"
Exit Sub
Else
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Dim objWord As Word.Document
Dim strSQL As String
Dim oConn As ADODB.Connection
Set objWord =
GetObject("\\Amedfsgpcbut800\Shared\4-Admin\ADForm.doc", "Word.Document")
' Make Word visible.
objWord.Application.Visible = True
' Set the mail merge data source as the database.
objWord.MailMerge.OpenDataSource _
Name:=CurrentDb.Name, _
LinkToSource:=True, _
Connection:="VIEW AD", _
SQLStatement:="Select * from [AD] WHERE(([MERGED])<>'MEMO_DONE')"
objWord.MailMerge.Execute
objWord.Application.ActiveDocument.SaveAs
objWord.Application.ActiveDocument.SaveAs("\\amedfsgpcbut800\shared\4-Admin\Additional_Duty_memos\to_be_signed" & [FName] & " " & Format([LName], [Duty]))
objWord.Close wdDoNotSaveChanges
Dim Workbase As Database
Set Workbase = CurrentDb
strSQL = "UPDATE [AD] Set MERGED='Merged'
WHERE(([MERGED])<>'MEMO_DONE'"
Workbase.Execute (strSQL)
DoCmd.Close
End If
Exit_Command88_Click:
Exit Sub
Err_Command88_Click:
If Err = 2501 Then 'The RunCommand action was canceled
Exit Sub
Else
MsgBox Err.Number & " - " & Err.Description
Resume Exit_Command88_Click
End If
End Sub