Textbox text brakes into one or more new lines (1 Viewer)

Hello1

Registered User.
Local time
Today, 10:29
Joined
May 17, 2015
Messages
271
I have a textbox on a form which shows data from a combobox column(1) and column(2). The textbox is wide enuff for the value to fit in one line but it brakes in one or more, not for every combobox choice but for many.

Is there a way to force the texbox to show the text just in one line without braking into more?

Thanks
 
Find out what character is forcing a new line (10 or 13 ?) and use the Replace function and replace it with a space perhaps.?
 
this is happening because your control is not wide enough for the text to be displayed and the text is automatically wrapped

So far as I know there is not way to prevent 'over long' text to not be wrapped

so your choices are:

1. widen you control further
2. reducing the height of the control so only 1 line will show - but some text will be hidden if it can't be displayed
3. reducing the font size so the control is wide enough
4. use the left function to only show the first 'x' number of characters
 
Yeah seems like this code in expression builder is making the new lines because I can see then in the query datasheet view too:

Code:
KompletanNaz: IIf(Left([Konto].[KontoNr];2)<>"20" Or Len([Konto].[KontoNr])=4 Or 
Left([Konto].[KontoNr];4)="2013" Or Left([Konto].[KontoNr];4)="2018";[Konto].[KontoName] & " " &
[Konto].[Adress];[Customer].[CustName] & " " & [Customer].[CompanyName] & " " & 
[Street].[StreetName] & ' br. ' & [Customer].[StreetNr])

Edit: any way to edit this so it doesnt make new lines? :(
 
Last edited:
Yeah seems like this code in expression builder is making the new lines because I can see then in the query datasheet view too:

Code:
KompletanNaz: IIf(Left([Konto].[KontoNr];2)<>"20" Or Len([Konto].[KontoNr])=4 Or 
Left([Konto].[KontoNr];4)="2013" Or Left([Konto].[KontoNr];4)="2018";[Konto].[KontoName] & " " &
[Konto].[Adress];[Customer].[CustName] & " " & [Customer].[CompanyName] & " " & 
[Street].[StreetName] & ' br. ' & [Customer].[StreetNr])
Edit: any way to edit this so it doesnt make new lines? :(
Hi. If the new line is always happening between StreetName and StreetNr, then you probably have a Rich Text Format field and the new line is happening because of the 'br. ' part. Try taking it out.
 
Thanks!
I went to the form and changed the textbox text format from plain text to rich text and now it shows in one line without changing the query.
If i keep the textbox text format as rich are the some down sides?
I also changed it on my report because I use the same on that report.
 
Thanks!
I went to the form and changed the textbox text format from plain text to rich text and now it shows in one line without changing the query.
If i keep the textbox text format as rich are the some down sides?
I also changed it on my report because I use the same on that report.
Hi. "Down side?" You can call it what you want but the one main difference is you cannot go back to plain text once you change a field to rich text. Good luck!
 
Whilst the PlainText operator works for display purposes you could also use it to revert to the original plain text using an update query
 
Whilst the PlainText operator works for display purposes you could also use it to revert to the original plain text using an update query

Okay, so this is probably where the question about the down side will come in. Since you cannot change a rich text field back to plain text but can strip the data to plain text and store it back into the same field, Access will probably add the <div> tags again, it the data was changed or updated again if not by an update query using the PlainText() function. If so, the user needs to be aware of this, so it doesn’t come up as a surprise.
 
Last edited:
Sorry DBG but I still disagree with what you are saying. Perhaps we are at cross purposes here?
You can change rich text back to plain text in two ways
1. Change the field text format back to plain text
2. Keep the field format as rich text and run an update query to PlainText([FieldName])

The only difference is that method 1 means any new records will be plain text.
With method 2 you can still have rich text formatting in any added records and of course put it back in the existing records if you wish
I've tested and did not find any issues with <div> tags being put back in.
 
Sorry DBG but I still disagree with what you are saying. Perhaps we are at cross purposes here?
You can change rich text back to plain text in two ways
1. Change the field text format back to plain text
2. Keep the field format as rich text and run an update query to PlainText([FieldName])

The only difference is that method 1 means any new records will be plain text.
With method 2 you can still have rich text formatting in any added records and of course put it back in the existing records if you wish
I've tested and did not find any issues with <div> tags being put back in.

Hi Colin. Method #1 surprises me. I didn’t expect it to work. I thought Access warns you this is not possible when you first convert a Memo field from Plain Text to Rich Text format. I will have to check this once I am in front of a computer. Thanks.
 
This is the message shown when you convert plain text to rich text
attachment.php


When you change back to plain text format this message is shown
attachment.php
 

Attachments

  • Capture.PNG
    Capture.PNG
    8.8 KB · Views: 280
  • Capture2.PNG
    Capture2.PNG
    5.8 KB · Views: 261
This is the message shown when you convert plain text to rich text
attachment.php


When you change back to plain text format this message is shown
attachment.php

Hi Colin. Thanks for the clarification. I’m still not in front of a computer, but this must be a change in Access from the first version that introduced this feature.
 
Hi Colin. Thanks for the clarification. I’m still not in front of a computer, but this must be a change in Access from the first version that introduced this feature.
Hello everyone. I stand corrected! I tried to do what I thought I was thinking about and couldn't produce what I was expecting to happen based on what I thought I remembered about Rich Text formatted Memo fields. I tried to look online and still couldn't find what I was looking for. Then I realize perhaps what I was thinking about was MVFs where Access will warn you that there is no going back once you said yes to the warning. If that's the case then I apologize for confusing everyone on this thread about the topic. Cheers!
 
Hi DBG
I never use MVFs for a number of reasons that I described in detail in this article http://www.mendipdatasystems.co.uk/multivalued-fields/4594468763.
As far as I'm concerned, MVFs are one of the worst Access features closely followed by attachment fields and calculated fields

Having said that I'm not clear which warning message you're referring to with respect to MVFs. Can you elucidate?
 
Hi DBG
I never use MVFs for a number of reasons that I described in detail in this article http://www.mendipdatasystems.co.uk/multivalued-fields/4594468763.
As far as I'm concerned, MVFs are one of the worst Access features closely followed by attachment fields and calculated fields

Having said that I'm not clear which warning message you're referring to with respect to MVFs. Can you elucidate?
When you try to create a MVF field, you would get the following message:
attachment.php
So, I may have thinking about this message when I was talking about the Rich Text format topic.
 

Attachments

  • mvf.PNG
    mvf.PNG
    23.6 KB · Views: 221
Thanks.
Oddly, if you create an MVF using the wizard when you first make the field, no such warning occurs.
As you said, Once an MVF field has been created, it cannot be reversed whether or not the field records have been populated
 

Users who are viewing this thread

Back
Top Bottom