C
Carol G
I use this function in an Access Report to Format Peoples names properly.
I wish to merge a word letter with my Access query but I don't know where in
Word I would place this code or something like it. Can I use a variable to
hold my result, in place of the merge fields drop down list which just
lists each field individually?
Any help would be appreciated.
Thanks,
Carol
Private Function Name_Concatenate()
Dim strFullName As String
If ComLaw = True Then
strFullName = FName1 & " " & LName1 & " " & "and" & " " & FName2 & " " &
LName2
Else
If IsNull(FName2) Then
strFullName = FName1 & " " & LName1
Else
strFullName = FName1 & " and " & FName2 & " " & LName1
End If
End If
Name_Concatenate = strFullName
End Function
I wish to merge a word letter with my Access query but I don't know where in
Word I would place this code or something like it. Can I use a variable to
hold my result, in place of the merge fields drop down list which just
lists each field individually?
Any help would be appreciated.
Thanks,
Carol
Private Function Name_Concatenate()
Dim strFullName As String
If ComLaw = True Then
strFullName = FName1 & " " & LName1 & " " & "and" & " " & FName2 & " " &
LName2
Else
If IsNull(FName2) Then
strFullName = FName1 & " " & LName1
Else
strFullName = FName1 & " and " & FName2 & " " & LName1
End If
End If
Name_Concatenate = strFullName
End Function