Character limits in unbounded textboxes

Hi all,

I have a form with 42 unbounded textboxes in to create a calendar. These are populated by an array using VBA.

Is it possible for these text boxes to show more than 255 characters?

Thanks,

Sarith
Sarith GadaData AnalystAsked:
Who is Participating?
 
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:
Also note that basic Access text field datatypes: (Text, Short Text)
...can only store a maximum of 255 characters.

If you need more than this, then use the Memo or Long Text datatypes

A simple way around this issue would be to tell the users to press
    Shift+F2
...to open the Zoom box to display more text.

Here is a zoom box easily displaying 300 characters at Tahoma/14pt
zoom box 300 tahoma 14
If you need even more room than this, ...then I suggest creating a "Zoom" popup form.
(I am sure any expert here could help you with that)
Hope this helps a bit...

JeffCoachman
1
 
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
They should support a string up to 64k.

What's the issue your having?

Jim.
0
 
Sarith GadaData AnalystAuthor Commented:
Hi Jim,

Please see the screen shots attached.

I have an on click event on the text box to open up a subform to show all tasks required to be completed on that day.

The textbox doesn't show all of these - it's cut off some of them, but all tasks are showing in the subform.

Hope that makes sense?

Thanks,

Sarith
Textbox-character-count-issue.png
Subform.png
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
PatHartmanConnect With a Mentor Commented:
Notice the scroll bars in the textbox.  That indicates more text.  The textboxes will not expand.  They stay the same size regardless of how much they hold.
1
 
Sarith GadaData AnalystAuthor Commented:
Hi all,

Thanks for the feedback.

Sadly, these are all unbounded and not linked to fields in tables so can't switch the data type to memo/don't know how to when not linked to a table.

It's purely aesthetic and can live with this as users have a full breakdown when they click on the textbox from the subform behind it, was wondering if there was a quick fix.

Thanks again!

Sarith
0
 
Sarith GadaData AnalystAuthor Commented:
Thanks all for your support in this.

Like I said, this was for aesthetic purposes as I can access the data in a subform, but was curious as to if this was possible or not.

Thanks again!

Sarith
0
 
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
<<was wondering if there was a quick fix.>>

  Not sure I understand what it is you expect to happen.   The control will certainly hold more than 255 characters if it is unbound and as Pat noted, it will show a scroll bar if the contents exceed the size of the control.

 That is standard for just about any tool.

 Access controls do have CanGrow and CanShrink properties, but they don't always do what you might expect and in doing that it would destroy the look of your calendar.

Jim.
1
 
Sarith GadaData AnalystAuthor Commented:
Thanks Jim,

I understand that, but as posted in screenshots above, I was wondering if all characters could be displayed whereas some have been cut out of my calendar.

Thanks though!

Sarith
0
 
PatHartmanCommented:
I did tell you in my post that boxes on forms DO NOT expand.  There is nothing you can do about that.  Forms work differently from reports.  In a report, you can set the boxes to expand but you may not like how the report renders.  The built in zoom or your own custom form is the only option.

Try converting the form to a report using save as.  Then make sure all the boxes AND the detail section are set to can grow = yes and can shrink = yes.  If you like the way that looks, you can add click event code to open the popup form.  You will have to open the report in Report View in order to make the click event active.

PS - the can grow/can shrink properties of the form are only applied when the report is printed.  Those properties have no effect when the form is opened in form view.
0
 
Sarith GadaData AnalystAuthor Commented:
PatHartman,

I appreciate that and did take that on board. I did not want the form to grow or shrink or expand. I wanted to be able to scroll and see all the text displayed from my array.

Could it be that my array is actually not holding the information? Is there a limit as to how many characters an array can hold?

Sorry thinking out loud, and I have appreciated all the support from everyone in developing my database.

Thank you all again!

Sarith
0
 
PatHartmanCommented:
Are you now saying that the scroll isn't working?  You did already accept two answers to this question.
0
 
Jeffrey CoachmanMIS LiasonCommented:
Just so we are clear, ...
1. You said:
I wanted to be able to scroll and see all the text displayed from my array.
...are you saying that (based on the screenshot you posted, ...clearly showing scroll bars for the textbox), ...that you cannot physically "scroll" the text to see all of it?,
...Or are you saying that you can scroll, but the text still is truncated?

2. "Arrays"
I seem to remember seeing a 255 limit to strings in arrays. (but this was a while ago)
Jim says that they can support 64k.
I will always defer to what Jim says.
Perhaps 255 was an old limit, ...or perhaps it was a limit in .mdb files....?
Perhaps you have to declare/dimension your array in a different manner?

Seems a bit outside the scope of this Q, ...but you may wish to investigate this further...

JeffCoachman
1
 
Sarith GadaData AnalystAuthor Commented:
Thanks Jeff.

I can scroll in textboxes, but the text is still truncated. So I believe it is an issue with character limits in arrays. I will look into this and see if that is the issue.

Thanks,

Sarith
0
 
Jeffrey CoachmanMIS LiasonCommented:
ok
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.