Removing the character limit of text boxes

G

Guest

I have three large (and seven small) text boxes in my Form, each of which
displays content dependent on which entry is selected in a list box on the
same form. The code that does this is below. (The three "Desc" text boxes are
the large ones; the others are much smaller (50 characters at max). My list
of course references all 11 columns (including the ID column).)

The Data Type of all the referred columns in my Database table is Memo, as
the three large text boxes must display up to approximately 500 characters.

However, although I can input the data into the table just fine, when I go
back to my Form and select entries in the list, I find that the large text
boxes are limiting the number of characters they display, cutting off parts
of the required information. They seem to display only the first 255
characters, when I need them to display up to 500 characters.

Having read around, I cannot find any solution. It seems people keep
suggesting to change the Data Type to Memo, which I had done before I noticed
this problem. I suspect, though, the problem lies in the way data is directed
into the text boxes (i.e. with the code below). Does my code truncate my
data? And is there any way to stop it from doing so?


Many thanks for your help.
~Maruno




Private Sub lstDMList_Click()
If Not IsNull(Me!lstDMList) Then
Me!txtDM = Me!lstDMList.Column(1)

Me!txtName1 = Me!lstDMList.Column(2)
Me!txtType1 = Me!lstDMList.Column(3)
Me!txtDesc1 = Me!lstDMList.Column(4)

Me!txtName2 = Me!lstDMList.Column(5)
Me!txtType2 = Me!lstDMList.Column(6)
Me!txtDesc2 = Me!lstDMList.Column(7)

Me!txtName3 = Me!lstDMList.Column(8)
Me!txtType3 = Me!lstDMList.Column(9)
Me!txtDesc3 = Me!lstDMList.Column(10)

End If
End Sub
 
J

John Vinson

Having read around, I cannot find any solution. It seems people keep
suggesting to change the Data Type to Memo, which I had done before I noticed
this problem. I suspect, though, the problem lies in the way data is directed
into the text boxes (i.e. with the code below).

It is.
Does my code truncate my data?

Yes. A listbox or combo box is not an unlimited-width conduit; by
putting the field into a listbox you are truncating it to 255
characters.
And is there any way to stop it from doing so?

Use the unique ID field in the table to *look up* the memo field,
rather than copying the data in the memo field itself into the
listbox. It LOOKS like you're trying to copy the memo text from one
table into another table - which is almost certainly a Bad Idea. Could
you explain the meaning and use of these textboxes?

John W. Vinson[MVP]
 
G

Guest

Row Source for my list:

SELECT [Database].[ID], [Database].[DMtitle], [Database].[AbilityName1],
[Database].[AbilityType1], [Database].[AbilityDesc1],
[Database].[AbilityName2], [Database].[AbilityType2],
[Database].[AbilityDesc2], [Database].[AbilityName3],
[Database].[AbilityType3], [Database].[AbilityDesc3] FROM [Database] ORDER BY
[Database].[DMtitle];


The text boxes are all in a Form. They are there simply to show data stored
in certain cells in my Table. Each particular text box displays data from
(always only) one column, and the row is dependent on what is selected in the
list. The text boxes are arranged in three groups of 3, and all of them
grouped underneath a main title (which is simply the name from the list). In
each group of 3, one text box is a subtitle, one text box is a one-word tag
for that title, and the final text box contains a paragraph or two for that
subtitle. Nothing more is done from here on. My Form is meant to only read
data in a table and display it in text boxes, not to modify it. It's a
directory, of sorts.

I get that my text boxes are referencing the truncated data that appear in
my list box, and that because it is a list box it automatically truncates
data in each column to the first 255 characters. What kind of modifications
to my code should I use so that it directs the text boxes to look at the
untruncated "Memo-type" cells in my Table? Or can I alter the settings of my
list box to force it to not truncate data (I only need a few extra hundred
characters)? I'm new to all this, so I would be grateful for detailed
pointers.


Thanks.
~Maruno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top