Text wrap in Listbox

Application - MS Access

Control - Listbox with 2 fields ( 1st = ID, 2nd = descriptor or information of significant length )

Requirements - that the descriptor has its information display within the field width.

Questions - can this be coded in VB so that the user sees all the information.    There will alway be more than one record to be displayed in the list.

Many thanks
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
No, there is no such thing as word wrap in a Listbox. You can mimic this by using a Subform that looks like a listbox.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
In a Access list box, text cannot wrap.

But you might want to look at this:


I bought the Component Toolbox ... the controls are awesome ... especially the TreeView ... considerable more flexibility than M$.  You can download for free and try.  Comes with Access mdb samples and A HELP file!  **Royality free distribution**!

53 some components ... big bang for the buck.

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Also ... see this:


Ok, I'll bite. Where else are you showing this same information to your user, AND
Do you really consider presenting your user with that much info in a control that was meant to be quick to read and quick to select, a good idea?
If it must be a listbox, then create a condensed version of the LONG description, and give your box some kind of click event to open a pop-up form with that long description in it if you must.

Otherwise, go with LSM on this one, and go with the subform.
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I have used this for listboxes:

SELECT Col1, Col2, IIF(Len(Col3)>25, Left(Col3, 20) & " ...", Col3) FROM SomeTable

This presents data like this:

Bob | Jim | This is a great way to ...

And then do as Jeff suggests and use a popup for more info ..
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.