Link to home
Start Free TrialLog in
Avatar of Sarith Gada
Sarith GadaFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

They should support a string up to 64k.

What's the issue your having?

Jim.
Avatar of Sarith Gada

ASKER

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
SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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
<<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.
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
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.
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
Are you now saying that the scroll isn't working?  You did already accept two answers to this question.
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
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