String length maxxed at 255 (1 Viewer)

CALV

Registered User.
Local time
Today, 05:27
Joined
Apr 25, 2001
Messages
74
Hi all,

I'm trying to edit some data which goes into a table via a text box, however, as soon as I try and use a variable for the text, it takes the first 255 characters then dumps the rest! is there a way around this?

TIA

CALV
 

WayneRyan

AWF VIP
Local time
Today, 05:27
Joined
Nov 19, 2002
Messages
7,122
Calv,

If you are looking at that much text data you
should make your table column and control memo
fields.

Wayne
 

CALV

Registered User.
Local time
Today, 05:27
Joined
Apr 25, 2001
Messages
74
Thanks for the reply,

The table is a memo, when the data is entered it stores it fine, it displays whats I require in a listbox (part of the text) , but, if I put for eg:

dim mytext as string
mytext = mylistbox.column(1,1)

then mytext only holds the first 255 characters of the selected item in the listbox, rather than the whole of it.
I then tried, from the immediate window (once it had the 255 characters in mystring

mystring=mystring & "aaaaa"
print len (mystring)

I got 255 again, for some reason it wont allow my strings to be longer then 255.

CALV
 

Bello

Registered User.
Local time
Today, 12:27
Joined
Jun 19, 2003
Messages
21
Hi Calv,

The problem lies on your listbox -- an listbox item can ONLY holds up to 255 characters.

According to Access specification, textboxes can holds maximumly 65,535 characters. You were trying to assign the textbox value from a listbox item, that's why it got you only the first 255.

Perhaps you need to use other methods for editing your memo data.

Hope that helps.

Bello
 

CALV

Registered User.
Local time
Today, 05:27
Joined
Apr 25, 2001
Messages
74
Thanks!

I'll look into an alternate method, I did search the help files, and the net but didnt come up with hte answer

CALV
 

Users who are viewing this thread

Top Bottom