assing memo field to string

  • Thread starter sheniece via AccessMonster.com
  • 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.
 
E

Ed Metcalfe

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.
 
S

sheniece via AccessMonster.com

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..
 
E

Ed Metcalfe

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.
 
G

Guest

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
 

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