assing memo field to string

  • Thread starter Thread starter sheniece via AccessMonster.com
  • Start date Start date
S

sheniece via AccessMonster.com

i am tring to assign a memo field to a string but the string is truncating
the value. I thought a string can hold 65k characters.
 
sheniece via AccessMonster.com said:
i am tring to assign a memo field to a string but the string is truncating
the value. I thought a string can hold 65k characters.

A string variable can hold 2^31 characters. I believe your problem is a
quirk of the memo field, not the VBA string variable.

Has the field always been a memo type, or has it ever been a text field and
has subsequently been converted to memo?

How many characters is the field being truncated to?

Ed Metcalfe.
 
Hi Ed. thanks for the response, the field has always been a memo type. the
reason I converted it to a string is because i am send it to word as a mail
merge and am assign the string to a document property. The string is being
truncated to 255 characters..
 
sheniece via AccessMonster.com said:
Hi Ed. thanks for the response, the field has always been a memo type.
the
reason I converted it to a string is because i am send it to word as a
mail
merge and am assign the string to a document property. The string is
being
truncated to 255 characters..

There are a number of things that can cause this. You may find the following
of some use:

http://www.thescripts.com/forum/thread552924.html
http://allenbrowne.com/ser-63.html

Ed Metcalfe.
 
What version of Access are you using?
What method are you using to assign the value of the memo field to the string?

Dim strMessage as string

strMessage = cstr(me.mem_yourField)

should work. At least I cannot recall having any problems with this
technique.


HTH
Dale
 
Back
Top