By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,233 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 IT Pros & Developers. It's quick & easy.

Inserting Strings into a text box

P: n/a
I'm trying to make a form Thank You letter that I can generate for
multiple people that took part in an auction. I have a table with all
of their information but am having dificulties creating the actual body
of the thank you note.

What I am trying to do is get it to format like this:

Dear (reference first name and last name fields from the table):

Thank you for your donation of (reference to donation field in the
table). The money we earned from your donation will really be a help to
our high school program.

Sincererly,

X High School PTA

How do I get the body of the note so I can insert text that will be
found in every letter along with the info that is specific to each
customer?

Your help will be greatly appreciated.

Thanks

-Ryan

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Make life easy on yourself. Use mail merge.

Nov 13 '05 #2

P: n/a
Put the below function in any module. Then you can call it
in a query like this.

FullName: fFullName(TblFirstName, tblMiddleName, tblLastname)
HTH
Ron
Public Function fFullName(fFirst As Variant, fMiddle As Variant, fLast
As Variant) As String
Dim cName As String
cName = ""
If IsNull(fFirst) Then
cName = ""
Else
cName = Trim(fFirst)
End If
If IsNull(fMiddle) Or fMiddle = " " Or fMiddle = "" Or IsEmpty(fMiddle) Then
Else
cName = cName & " " & Trim(fMiddle)
End If
If IsNull(fLast) Or fLast = " " Or fLast = "" Or IsEmpty(fLast) Then
Else
cName = cName & " " & Trim(fLast)
End If
fFullName = Trim(cName)
End Function
Ryan Muller wrote:
I'm trying to make a form Thank You letter that I can generate for
multiple people that took part in an auction. I have a table with all
of their information but am having dificulties creating the actual body
of the thank you note.

What I am trying to do is get it to format like this:

Dear (reference first name and last name fields from the table):

Thank you for your donation of (reference to donation field in the
table). The money we earned from your donation will really be a help to
our high school program.

Sincererly,

X High School PTA

How do I get the body of the note so I can insert text that will be
found in every letter along with the info that is specific to each
customer?

Your help will be greatly appreciated.

Thanks

-Ryan

*** Sent via Developersdex http://www.developersdex.com ***


Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.