Text getting cut off

G

Gary Dolliver

Hi all,
I am attempting to pass a large amount of text to a field when I close a
form, however, the text is being cut off, usually ending in weird ASCII
characters. It is random of how many characters it captures, but it never
puts in the full amount of text that is in the field. However, I can then
cut and paste the text into the table, and it all stays in there.
I am using MySQL tables, and the field is set to LONGTEXT. My code uses a
VB INSERT INTO and works, except for the one field not capturing everything.

DoCmd.RunSQL "INSERT INTO Notes_letters (Order_ID, Letter_Sent,
Date_Entered, Entered_By) VALUES ([Order_ID], [Body], Now(), CurrentUser() )"

I am not sure where to pursue this, but thought I would start here. Please
let
me know if more information is needed.
Perhaps instead of saving to a table, would it be better to have it create a
text file and save it elsewhere?
Help is always appreciated, thanks!
-gary
 
N

NoodNutt

G'day Gary

Most table.fields are restricted to 255 characters.

So if the large amount of data you are attempting to pass exceeds the limit
it will cut it off after that limit.

try changing that particular Text field to a Memo.

the only downside to using memo fields is you can't groupby in a query.

HTH
Mark.
 
G

Gary Dolliver

Hello,
Thank you for the reply. Unfortunately, I am using MySQL tables (with an
Access front end) and memo has been replaced with LONGTEXT - which is what
the field is set to. What is strange is the area where the ASCII characters
begins is always at a different place - and then, if I was to paste in all
the text to the field, it all goes in and stays there with no weird
characters. Any ideas?
-gary
 
G

Gary Dolliver

Hello,
Thinking this was a MySQL issue, I created an identical table in MS Access,
with the one field being set to "memo", and I am experincing the same thing.
It is not pasting in the entire letter, and I get weird characters instead:
Once the ûÂá Ðˆê¸ á‘ á‘172168
HELP!
-gary
 
S

strive4peace

Hi Gary,

try pasting into NotePad, then from NotePad into Access

where is the information coming from?

do you have an InputMask or Format set for the field in table design or
on a form control that is being used?

Warm Regards,
Crystal

*
:) have an awesome day :)
*
 
G

Gary Dolliver

Hi Crystal! Good to hear from you again.
If I am to copy and paste from either notepad, Outlook or anything into
Access, it stores the data correctly. It seems to be something with the
insert command. I do not have any formating on the field that originally
contains the text, should I?
thanks
-gary
 
S

strive4peace

Hi Gary,

thanks

No, you do not want a Format or InputMask -- that will limit the text to
255 even if it is a memo field.

I am not sure what else to tell you ... seems like you may have to
settle for an intermediate step for now. Where is the text originally
being copied from?


Warm Regards,
Crystal

*
:) have an awesome day :)
*
 
G

Gary Dolliver

Hi Crystal,
I am creating a letter and inserting text into a large, visible text field,
and then it either sends all of this information to an Access report, or to
an email in Outlook. I either copy the text directly from the initial Access
text field, or from the body of the email, and then paste it back in to a
different area, where I want to be able to view the letter that was sent. if
I paste in the text, it stays, but if I was to rely on the insert, it gets
the jibberish.
-gary
 
S

strive4peace

Hi Gary,

when you say "use the Insert", what do you mean? (apparently I do not do
that)

perhaps that method is picking up the hidden codes behind the text and
showing you what they really are ;)


Warm Regards,
Crystal

*
:) have an awesome day :)
*
 

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