J
Jones
The following code outputs a single record to an external database which MS Word opens and formats the form letter. The Comments
field is a Memo type but when I tried to use the Memo parameter field type Access won't allow it. In the output query the 8 comments
are concatenated together into a Memo field and every thing works fine.
Why is the Memo parameter field type not working. (Access 2003 SP2)
With CurrentDb.QueryDefs("OutputGeneralFormLetter")
.Parameters!theCustomer = theCustomer
.Parameters!theRE = RE
.Parameters!theAttn = Attn
On Error Resume Next
.Parameters!theComment1 = Mid$(Comments, 1, 255)
.Parameters!theComment2 = Mid$(Comments, 256, 255)
.Parameters!theComment3 = Mid$(Comments, 511, 255)
.Parameters!theComment4 = Mid$(Comments, 766, 255)
.Parameters!theComment5 = Mid$(Comments, 1021, 255)
.Parameters!theComment6 = Mid$(Comments, 1276, 255)
.Parameters!theComment7 = Mid$(Comments, 1531, 255)
.Parameters!theComment8 = Mid$(Comments, 1786, 255)
.Parameters!theEmployeeName = EmployeeName
.Parameters!theDate = Format(theDate, "Long Date")
On Error Resume Next
.Execute dbFailOnError
If Err.Number <> 0 Then
Msgbox Err.Description & " Output General Form Letter"
End If
End With
field is a Memo type but when I tried to use the Memo parameter field type Access won't allow it. In the output query the 8 comments
are concatenated together into a Memo field and every thing works fine.
Why is the Memo parameter field type not working. (Access 2003 SP2)
With CurrentDb.QueryDefs("OutputGeneralFormLetter")
.Parameters!theCustomer = theCustomer
.Parameters!theRE = RE
.Parameters!theAttn = Attn
On Error Resume Next
.Parameters!theComment1 = Mid$(Comments, 1, 255)
.Parameters!theComment2 = Mid$(Comments, 256, 255)
.Parameters!theComment3 = Mid$(Comments, 511, 255)
.Parameters!theComment4 = Mid$(Comments, 766, 255)
.Parameters!theComment5 = Mid$(Comments, 1021, 255)
.Parameters!theComment6 = Mid$(Comments, 1276, 255)
.Parameters!theComment7 = Mid$(Comments, 1531, 255)
.Parameters!theComment8 = Mid$(Comments, 1786, 255)
.Parameters!theEmployeeName = EmployeeName
.Parameters!theDate = Format(theDate, "Long Date")
On Error Resume Next
.Execute dbFailOnError
If Err.Number <> 0 Then
Msgbox Err.Description & " Output General Form Letter"
End If
End With