textbox getting truncated from listbox RRS feed

  • Question

  • Hello.  Have a listbox on a form that displays the record.  One of the fields is a note field.  I click the listbox record and the info is then displayed in the different fields on the form.  One of the fields on the form is a textbox that is made to type into and display the notes.  All the tables are linked sql server tables.  The note field in sql is a varchar(max).  I type a note into the field on the form and save it, the sql table has all the note info I typed in.  The linked table has all the info in the field.  I am not able to see if the listbox has it all.  But when I click on the record the note gets cutoff at around 255 in the txtbox.  I placed a msgbox in the listbox click event just after the note column and it was also truncated at around the 255 count.  

    Does a listbox column have limitation of characters to it?  Is the listbox column limited to 255 characters?  Did I miss a textbox setting?  Or a listbox setting?  Is there some type of work-a-round?

    I have another of these situations in another form and tried it and it also cuts off at 255 in the textbox when the listbox is clicked to display the record information in the form fields.


    Monday, December 14, 2015 6:10 AM


All replies

  • Hi,

    yes, the maximum length of a listbox (or combobox) column is 255 characters.

    If you need more you have to use a different control or method, e.g. a textbox filled by some code or expression or a subform.

    Access FAQ (de/it):
    Access Lobby:

    • Marked as answer by johnboy0276 Monday, December 14, 2015 2:06 PM
    Monday, December 14, 2015 1:58 PM
  • Well, that sucks.  Karl, thanks for the info.  Time to go back to the drawing board.


    Monday, December 14, 2015 2:06 PM
  • An alternative solution is to use a sub form, in continuous forms view.  You can set the record source to be the same as your listbox row source, and adjust the controls, border formatting to mimic a listbox.   If a user clicks on a textbox or combo box in Access and hits Shift+F2, it will bring up the built-in 'Zoom Box' feature which allows users to see and/or edit information in larger fields (such as your Notes field).

    Miriam Bizup Access MVP

    • Edited by mbizup MVP Monday, December 14, 2015 2:56 PM
    Monday, December 14, 2015 2:52 PM
  • Miriam, thanks for the idea.  I actually used a sql SELECT on the click with a recordset.  Did some testing and it all seems to be working the way it should.  The SELECT only pulls one record at a time because of the WHERE clause.  Added more info to the note and it updated correctly as well.  But I do like the idea you proposed.  I will be keeping it available for future use in the development of the app.  


    Monday, December 14, 2015 4:28 PM