4 hours ago: Our file storage provider is running maintenance today. If any videos don't load, wait a minute, refresh the page, and try again. Sorry for any inconvenience.  Dismiss
Computer Learning Zone CLZ Access Excel Word Windows

Education makes a people easy to lead but difficult to drive: easy to govern, but impossible to enslave.

-Peter Brougham
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
Home > Courses > Access > Seminars > Email > Lessons >
Back to Email Seminar Lessons    Comments List
Long Text truncating Upload Images   Link   Email  
Amanda McDonald       
4 months ago
I created an Email Template Form as taught in the seminar lessons.
I created a "Send To" table called EmailSendGroup.
"Send To" table has 5 fields.
SendGroupID - AutoNumber
SendGroupInActive - Yes/No
SendGroupGroupName - Short Text: Short Descriptive Name
SendGroupGroupDescription - Short Text: Longer description of customers included in the group.
SendGroup - Long Text: SQL Statement for the Send To Group

I enter the new records for the send groups via a form.
The form works well, and the table looks good.

Then I made some changes to the Email Template Form from class.
I changed the To field to an unbound drop-down combo box named SelectSendGroup.
SelectSendGroup Row Source = SELECT EmailSendGroup.SendGroupID, EmailSendGroup.SendGoupName, EmailSendGroup.SendGroupDescription, EmailSendGroup.SendGroup, EmailSendGroup.InActive FROM EmailSendGroup WHERE (((EmailSendGroup.InActive)=False));

I added 3 other text boxes to the Email Template table and form.

SendGroupID - Short Text
SendGroupName - Short Text
SendGroup - Long Text

I added the following to the AfterUpdate and Change events for the SelectSendGroup combo box.

DetailsPrivate Sub SelectSendGroup_AfterUpdate()
        Me.SendGoupID.value = Me.SelectSendGroup.Column(0)
        Me.SendGroupName.value = Me.SelectSendGroup.Column(1)
        Me.SendGroup.value = Me.SelectSendGroup.Column(3)
End Sub

DetailsPrivate Sub SelectSendGroup_Change()
    If Len(Me.SelectSendGroup.Text) > 0 Then
        SQL = "SELECT EmailSendGroup.SendGroupID, EmailSendGroup.SendGoupName, EmailSendGroup.SendGroupDescription, EmailSendGroup.SendGroup, EmailSendGroup.InActive FROM EmailSendGroup WHERE (((EmailSendGroup.InActive)=False));"
    End If
        Me.SelectSendGroup.RowSource = SQL
End Sub

Everything works fine except the SendGoup field is getting truncated and cutting off at around 230ish characters.
If I copy and paste the SQL statement into the field it doesn't get truncated.
Can I change something in the code to stop it from truncating?

There are multiple SendGroups that the Email Templates could get sent to and I want the users to be able to mix and match the Templates and SendGoups.
We could have 5 (sometimes more) SendGroups for one Email Template. If I have to paste the SQL statement into the template form I will have to make 5 templates, one for each group.
Kevin Yip       
4 months ago
A combo box column can only has up to 255 characters.  That is the reason your long text field is truncated.  Access truncates a long text field, without warning, whenever certain "processing" needs to be done on the long text field, such as the process of putting a long text field inside a combo box.  Therefore, your long text field should not be put inside a combo box.  You need to retrieve it separately with DLookup or a recordset.  After retrieving it, don't put it through any combo box, query, etc.
Amanda McDonald       
4 months ago
Thank you, Kevin!!! As soon as I switched it to DLookup it worked great! I searched the internet for at least two hours. I found a lot about truncating long text boxes but nothing that applied and/or fixed my problem. I was sure I had something wrong with my VBA, didn't even come close to putting it together with it being a combo box. Another rough lesson!

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Email Seminar Lessons.


The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.

Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
My Account
My Courses
Lost Password
Student Databases
Change Email
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Customer Support
Web Site Tour
Consulting Services
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Video Tutorials
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Terms of Sale
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 7/14/2024 10:44:18 AM. PLT: 1s