Combo box text limit off 255 characters

Bradon

Board Regular
Joined
Dec 18, 2002
Messages
66
I have a series of combo boxes on a form which work well but they limit the text selected to 255 characters. Is there any way of extending the character limit. I tried changing the field to "Memo" but it wouldn't have it; when i did it it blanked out the lookup section.


I know I can link several fields together in the report but I want a method that the user only has to select one comment to get all the text needed.

Ideally I am trying to get 1500 characters. :rolleyes:
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I don't think you can do that. In any case you'll likely exceed the maximum allowable form width. Why do you need so many characters displayed in a combobox?
 
Upvote 0
I don't actually need to display all of the text - just need the ability to print it in a report. 1000 characters would be useful....

The people using the form need to write about this amount of data in one field - they have difficulty understanding that 2 or more can be joined in a report!
 
Upvote 0
I'm not sure what the actual limit is, but when I checked, vba string variables can go beyond 255 characters (beyond 1500).

I've never tried this, but I think the theory works.

What if you used the Keypress event to check the textbox value length. Once it hits 255 characters, move the focus to a second textbox and let the user continue typing without any break.

To make it a little cleaner, you might use InStrRev to look for a space (and hopefully the break between words) allowing you to identify the last 'full' word typed and move everything else into the second textbox.

Mike
 
Upvote 0
As a completely different thought.
What if you opened up Notepad from within Access and stored the contents when exiting/done?

By Notepad, I'm referring to the MS-Windows application Notepad.exe.
As a second thought, opening MS Word might be better since you can control it's operation via VBA.
 
Upvote 0
The data needs to display in a combo box on a form.

The VBA route sounds interesting but I haven'y a clue where to start. Any chance of a pointer or two???

Changing tact a bit, do you know any good books or online courses for VBA?

Thanks again for your help.

Gordon
 
Upvote 0
If you want to store a lot of data store it in a memo field. You could probably then use code to match the combo's field to the first 255 characters from the memo field or you could just let the users add a useful reference in the combo.

HTH

Peter
 
Upvote 0
The original data is already stored in a memo field but I need to display it all in a form and print out to a report from the holding field of the combo box - it is the display on a form and printout from the holding field that I need to enlarge beyond 255 characters.
 
Upvote 0
You will not be able to show more than the 255 limit in a combobox or textfield. For the report it would not matter anyway as you can just print the memo field.
If your problem is one of selecting the data from a standard list to associate with a document then you may need to do something like a continuous sub form and use that for record selection. Anyway a combobox with 1000 characters would be almost impossible to use!

Peter
,
 
Upvote 0

Forum statistics

Threads
1,216,725
Messages
6,132,348
Members
449,719
Latest member
excel4mac

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top