473,396 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Inserting Strings into a text box

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
2 1247
Make life easy on yourself. Use mail merge.

Nov 13 '05 #2
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: pmud | last post by:
I have an ASP.NET web application using C# code. I am trying to insert values from a web form into an SQL database. I am using SQL COMMAND object for this. I need to know HOW TO INSERT THE RADIO...
1
by: Scott Chapman | last post by:
I am working with Python (psycopg). I have HTML with embedded Python that I'm inserting into a database and it could contain any character. Single quotes, at least, must be escaped (to two...
5
by: Peter Nagel | last post by:
I would like to insert some strings in a multiline TextBox. At the time of inserting the TextBox already contains some strings each in a separate line. The new lines should be inserted somewhere in...
6
by: 35th Ave Media | last post by:
Hello, I have about 60+ pages that I need to insert a MAILTO: tag so people can email the page using their email client. The body of the message is going to be the URL of that page. Using ASP,...
3
by: mjteigen | last post by:
I'm very new at Python, but have been trying it in conjunction with CGI. I've encountered a problem that I'm pretty sure is a trivial one, but I don't know enough Python to work it out. Here's an...
1
by: ing42 | last post by:
I have a problem with inserting records into table when an indexed view is based on it. Table has text field (without it there is no problem, but I need it). Here is a sample code: USE test GO...
3
by: rcoco | last post by:
Hi, I want to share this problem. I have a datagrid that will help me Insert data into sql database. So I made a button On my form so that when I press the button a new row on datagrid should be...
2
by: AlexanderDeLarge | last post by:
Hi! I got a problem that's driving me crazy and I'm desperately in need of help. I'll explain my scenario: I'm doing a database driven site for a band, I got these tables for their discography...
6
by: gita ziabari | last post by:
Hello All, The following code does not work for unicode characters: keyword = dict() kw = 'генских' keyword.setdefault(key, ).append (kw) It works fine for inserting ASCII character. Any...
5
by: atlanteavila | last post by:
Hello all, I have a problem with inserting text with quotes, or html code in to a MYSql Database. I've been trying to create my own content management system, and unfortunately I've come accross a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.