<div> in Query results

Weekleyba

Registered User.
Local time
Yesterday, 22:41
Joined
Oct 10, 2013
Messages
586
I have a query the results shown below. I get <div> comment </div> in one of the fields.
The Text Format for that field is set to Rich Text in T_Update.
How do I fix?

1619280182233.png

1619280269577.png
 
Can you change the Text Format from Rich Text to Plain Text?
 
I can. And the <div> disappears.
But, I do want the rich text option.
I change the T_Update table to Rich Text and the Form field where this gets inputted from the user to Rich Text.
I then get this when turning font to red. (first row only turned to red font)
Why doesn't the query show the red font?
1619282256735.png
 
It appears to be because it's a Totals Query. If I deselect the Totals query button, it works.
Does that seem right?
1619282877801.png
 
I guess I don't really need to view the query so I guess it doesn't matter.
The form and report shows red which is what I really needed.
It took a bit to make it work for some reason. The form text box would did not allow me to change it to Rich Text until I first took the off the Total Query. Then it allowed me to change it to Rich Text, then I changed the query back to Totals and it worked. Weird....
 
I went back to another database I've done and it works there...?? Go figure. Must be a glitch.
1619283678843.png
 
Hi. Glad to hear you got it sorted out. Cheers!
 
The fact that it works correctly in on DB but not in another probably means that some setting is different. From the main screen, select File >> Options and then browse around in Current Database (one of the options) on both machines. Also a possibility: Object Designers and Client Settings (two other options). One of those three is your culprit, I would think. If you find settings that are different between the two, experiment. You can go back later and reverse the settings you changed.
 
I'm still stumped on this one.
Below is an example of the problem.

I shrunk the query to just two tables. T_Project and T_Update.
See tables below and then the simple query.
Then I change it to a Totals query and it truncates my UpdateComment field.
Why does this happen?

1620922297568.png

1620922340400.png


1620922490465.png


1620922517988.png


Then, since I want the last update in a report, I change this query to a totals query.

1620922648259.png

1620922685518.png
 
Why does this happen?
Because to totals a query, the records have to be grouped. And when you group a text field, Access stops at 255 characters to speed things up.

What you want to do is don't include the Long Text field in the Totals query and just add it later using a different query.
 
Last edited:
I'm not sure what is going on with this??
I recreated the query and now it works. Go figure.
Both queries are shown below. The first one is the OLD one with the problem of truncating.
I recreated the query, with everything basically identical and it worked.
Access glitch???

1620934927920.png


1620934976671.png
 
Part of the issue is, sometimes the Property Sheet for the query will show the Text Format field for the text fields and sometimes it will not show it.
Note below for the UpdateComment field, the Text Format is not shown.
1620936084973.png


Then with the new query, that is identical to the old one, it does show the Text Format.

1620936184613.png
 
Unrelated to the question but in post #1, your T_Engineer table contains a field for EngineerFullName, that is not necessary to store that since you are already storing the first and last name already. Just use a query to create the full name where needed.

I also see the possibility to eliminate the long text field by using a Notes table that just splits up all those individual note entries into smaller sensible components. Then, when an actual update is made, it is in a subform that has the NoteID, ProjID, NoteDate, Action, comment. Using a query could piece all those parts back together for display on a form or in a report.

Here is an example of one that I use. Of course this assumes that no individual comment would exceed 255 characters. If that happens, I usually just split the comment into two different notes as required.

1620936920998.png
 

Users who are viewing this thread

Back
Top Bottom