Computer Learning Zone CLZ Access Excel Word Windows

One of the biggest problems with the world today is that we have large groups of people who will accept whatever they hear... just because it suits their worldview, not because it is actually true or because they have evidence to support it.

-Neil deGrasse Tyson
 
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
Upload Images   Link   Email  
Long Text truncating
Amanda McDonald 
      
11 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));"
    Else
    End If
  
        Me.SelectSendGroup.RowSource = SQL
        Me.SelectSendGroup.Dropdown
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 
     
11 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 OP 
      
11 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.
 

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

LinkedIn
Copyright 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 2/15/2025 2:40:30 AM. PLT: 1s