Question : Firewall blocking external router

We have a branch office with a static IP, this IP address will not load in my browser and I'm figuring its a firewall issue as if I try from home, the IP address works without a hitch.

Error Code: 502 Proxy Error. The host server is unreachable. (10065)

there are no access rules preventing this, any ideas on what is happening here?

Answer : Firewall blocking external router

You mean you are only merging one main record at a time?  In that case, why do you need to use both MailMerge AND bookmarks?  I was assuming you were merging multiple "Improvement" records, and for each of these you needed to insert multiple "NonCompliance" records.

For a single record merge, you could use only bookmarks.  It appears that your code is already doing this successfully without using a mail merge at all.  Lines 22-26 are inserting fields from the parent record, and lines 29-37 are inserting the child NonCompliance records.

There is yet another approach which would work for you because the NonCompliance list is a simple list, not one that needs inserting into a table.  The trick is to use a function to assemble a delimited list of child records as a field in your query.  Then it can be treated as a single merge field.

Attached is a function named DelimitedList.

In the query that you are using for your mail merge, add the following field:

ImprovementList: DelimitedList( "Select * From NonCompliance Where [Improvement Notice ID] = " &
    [Improvement_Notice_ID], "NonCompliance", Chr(13) )

This will create a string of all the NonCompliance values matching the given [Improvement Notice ID], and separated by vbCr characters.  This can be used as a merge field and no bookmarks are required at all.

--
Graham

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
Public Function DelimitedList( _
  RecordSource As String, _
  Optional ListField As Variant = 0, _
  Optional Delimiter As String = ", ") As String
Dim db As Database, rs As Recordset, sList As String
On Error GoTo ProcErr
  Set db = CurrentDb()
  Set rs = db.OpenRecordset(RecordSource, dbOpenForwardOnly)
  Do Until rs.EOF
    sList = sList & rs(ListField) & Delimiter
    rs.MoveNext
  Loop
  If Len(sList) <> 0 Then
    DelimitedList = Left(sList, Len(sList) - Len(Delimiter))
  End If
ProcEnd:
  On Error Resume Next
  rs.Close
  Exit Function
ProcErr:
  DelimitedList = "Error #" & Err
  Resume ProcEnd
End Function
Random Solutions  
 
programming4us programming4us