Appreciate Opinions on LongText Fields (1 Viewer)

Pat Hartman

Super Moderator
Staff member
Local time
Today, 07:14
Joined
Feb 19, 2002
Messages
43,293
And because the updated record ends up in a different place from the original record, you will see records out of place (based on PK sequence) if you don't specifically sort a recordset:)
 

Mike Krailo

Well-known member
Local time
Today, 07:14
Joined
Mar 28, 2020
Messages
1,044
Can't search on long text fields
This is a big disadvantage and is the reason I avoid using rich text in them. You can search in them as long as they just have plain text.

So after all of the above digging into the workings of long text fields, what is the ultimate conclusion? Do they still cause problems or not? It appears like most of us don't see an issue with them anymore but just wanted to confirm.
 

isladogs

MVP / VIP
Local time
Today, 12:14
Joined
Jan 14, 2017
Messages
18,235
This is a big disadvantage and is the reason I avoid using rich text in them. You can search in them as long as they just have plain text.

So after all of the above digging into the workings of long text fields, what is the ultimate conclusion? Do they still cause problems or not? It appears like most of us don't see an issue with them anymore but just wanted to confirm.

Sorry my answer was incomplete. I should have said that queries will often truncate memo fields at 255 characters therefore limiting their usefulness when filtering

In fact, you can search long text fields with rich text by filtering on a PlainText version of the field:

Code:
SELECT tblRichText.ID, tblRichText.Details, PlainText([Details]) AS PlainTextDetails, tblRichText.Details AS HTMLDetails
FROM tblRichText
WHERE (((PlainText([Details])) Like "*text with*"));

The screenshot shows the query results & part of the original table
1660478822894.png


I often use the PlainText function to allow me to search rich text memo fields
 

Mike Krailo

Well-known member
Local time
Today, 07:14
Joined
Mar 28, 2020
Messages
1,044
So the PlainText method strips out the actual text from the html? That's a great idea as long as it doesn't slow things down. Opens up some possibilities now. I just looked that up and sure enough that option is available.
 

isladogs

MVP / VIP
Local time
Today, 12:14
Joined
Jan 14, 2017
Messages
18,235
No, the plain text function doesn't cause any noticeable slowdown even when the record is very large & the formatting is complex
And in answer to your earlier question, I have no issues about using long text / memo fields
 

CJ_London

Super Moderator
Staff member
Local time
Today, 12:14
Joined
Feb 19, 2013
Messages
16,616
I use plaintext/richtext instead of conditional formatting on continuous forms where it is much faster.

Note you can apply richtext to form/report textbox controls, even if the controlsource is a short text field

Does mean that when viewed in the table the short text will look like as shown in Colin's post #23 - or you apply the formatting code in the form recordsource.
 

Users who are viewing this thread

Top Bottom