I would help if you showed the procedure that you are running. Copy and
paste the code into a message that you post back here.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
>I have a mail merge document that is linked to an Access database table. A
> VBA procedure runs from Access that updates that table thereafter opens
[quoted text clipped - 15 lines]
>
> Any assistance would be greatly appreciated.
Here it is and thank you...
Private Sub cmd_Informal_Click()
Dim qrf As querydef
Dim Name As String
Dim db As Database
Dim rst As Recordset
If IsNull(Me!Name.Value) Then
MsgBox "Please enter Full Name to continue.", vbExclamation, "MISSING
FULL NAME"
Me!Name.SetFocus
Exit Sub
End If
Name = Me!Name.Value
If Name = Null Then
MsgBox "Please enter Agent name.", vbExclamation, "MISSING AGENT NAME"
Exit Sub
End If
Set db = CurrentDb
DoCmd.SetWarnings False
DoCmd.RunSQL "delete from temp_Informal"
Set qrf = db.QueryDefs("qry_Informal")
qrf.Parameters("name") = Name
qrf.Execute
Set qrf = Nothing
DoCmd.SetWarnings True
Set rst = db.OpenRecordset("temp_Informal")
With rst
If .EOF = True Then
MsgBox "There are no records available for:" & vbCrLf & Me!Name &
vbCrLf & "Please check the spelling of the name.", vbExclamation, "NAME DOES
NOT EXIST"
Me!Name.SetFocus
.Close
Exit Sub
Else
DoCmd.SetWarnings False
DoCmd.RunSQL "delete from temp_Occurrences"
Set qrf = db.QueryDefs("qryComplete Occurrence History")
qrf.Parameters("name") = Name
qrf.Execute
Set qrf = Nothing
DoCmd.SetWarnings True
Set rst = db.OpenRecordset("temp_Occurrences")
If .EOF = True Then
MsgBox "There are no occurrences to report for" & Name,
vbExclamation, "NO OCCURRENCES"
Me!Name.SetFocus
.Close
Exit Sub
Else
Dim Idoc
Set Idoc = CreateObject("Word.Application")
Idoc.Visible = True
Idoc.Documents.Open
Filename:="\\holnt01\public\Projects-Hollywood\S3\Databases\Working\Attendance\Informal Merge.doc"
DoCmd.OutputTo acOutputReport, "Occurrence_History",
acFormatRTF,
"\\holnt01\public\Projects-Hollywood\S3\Databases\Working\Attendance\OccurrenceHistory.doc", True
.Close
End If
End If
End With
End Sub
> I would help if you showed the procedure that you are running. Copy and
> paste the code into a message that you post back here.
[quoted text clipped - 18 lines]
> >
> > Any assistance would be greatly appreciated.