Want Insert into meno fields ( including Nextline character) 
Author Message
 Want Insert into meno fields ( including Nextline character)

Hi,

I have a problem which I couldn't solve.

I have a sql statement which contains next line character...
when I use de{*filter*} to print out the sql statement, I can see the
whole formatted text.

but after I run the sql statement by using

currentdb.execute strSql

When I read that field from the form or table or copy the meno field
from table and past to notepad, it shows me the text without nextline
character...

Does anyone know the reason...please help

----------------------------
Ivan Lee
http://www.*-*-*.com/



Fri, 04 Mar 2005 23:50:28 GMT  
 Want Insert into meno fields ( including Nextline character)


Quote:

> When I read that field from the form or table or copy the meno field
> from table and past to notepad, it shows me the text without nextline
> character...

> Does anyone know the reason...please help

It may be because SQL ignores white space?

Try recasting the SQL as

update blah
set blah1= etc,
blahmemo = "First Line" & vbCrLf & "SecondLine";

so as to make the crlf's explicit.

Or else use AppendChunk etc.

HTH

Tim F



Sat, 05 Mar 2005 02:45:27 GMT  
 Want Insert into meno fields ( including Nextline character)

Quote:

>Hi,

>I have a problem which I couldn't solve.

>I have a sql statement which contains next line character...
>when I use de{*filter*} to print out the sql statement, I can see the
>whole formatted text.

What are you using as the "nextline character"? In Windows, it's *TWO*
characters: Chr(13) followed by Chr(10), a carriage return and a
linefeed. There is a VBA constant vbCrLf (or, equivalently, vbNewline)
you can use to insert it. Typing Ctrl-Enter while manually entering
data, or setting the "Enter Key Behavior" property of a textbox to New
Line In Field, inserts this.

Quote:
>but after I run the sql statement by using

>currentdb.execute strSql

>When I read that field from the form or table or copy the meno field
>from table and past to notepad, it shows me the text without nextline
>character...

Sounds like you might be inserting just a linefeed (Chr(10)) or just a
carriage return.

                  John W. Vinson[MVP]    
    Come for live chats every Tuesday and Thursday
http://www.*-*-*.com/



Sat, 05 Mar 2005 02:49:27 GMT  
 Want Insert into meno fields ( including Nextline character)
Maybe I should make it more clear

when print out the string variable which contains sql statement in
de{*filter*}, I can see

"INSERT INTO table_name VALUES ( ' jsoadjro
asdjrojoasd
line 3  ' ) "

 but after I execute it and read from either the table or form, I
could see the format with the next line...

Quote:

>>Hi,

>>I have a problem which I couldn't solve.

>>I have a sql statement which contains next line character...
>>when I use de{*filter*} to print out the sql statement, I can see the
>>whole formatted text.

>What are you using as the "nextline character"? In Windows, it's *TWO*
>characters: Chr(13) followed by Chr(10), a carriage return and a
>linefeed. There is a VBA constant vbCrLf (or, equivalently, vbNewline)
>you can use to insert it. Typing Ctrl-Enter while manually entering
>data, or setting the "Enter Key Behavior" property of a textbox to New
>Line In Field, inserts this.

>>but after I run the sql statement by using

>>currentdb.execute strSql

>>When I read that field from the form or table or copy the meno field
>>from table and past to notepad, it shows me the text without nextline
>>character...

>Sounds like you might be inserting just a linefeed (Chr(10)) or just a
>carriage return.

>                  John W. Vinson[MVP]    
>    Come for live chats every Tuesday and Thursday
> http://www.*-*-*.com/

----------------------------
Ivan Lee
http://www.*-*-*.com/


Sat, 05 Mar 2005 23:03:49 GMT  
 Want Insert into meno fields ( including Nextline character)

Quote:

> but after I execute it and read from either the table or form, I
>could see the format with the next line...

I'm sorry, I just can't understand what you're saying here. What do
you see in the form? a black box instead of the end-of-line? the text
all run together? or what?

                  John W. Vinson[MVP]    
    Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public



Sun, 06 Mar 2005 01:39:10 GMT  
 Want Insert into meno fields ( including Nextline character)
Thanks for you all guys help,
I have solved the problem...for some reasons,
the field stores only Chr(10) instead of Chr(13) ...so I just write a
macro to replace all Chr(10) to Chr(13), then all the problems
solved...thanks

On Tue, 17 Sep 2002 11:39:10 -0600, John Vinson

Quote:


>> but after I execute it and read from either the table or form, I
>>could see the format with the next line...

>I'm sorry, I just can't understand what you're saying here. What do
>you see in the form? a black box instead of the end-of-line? the text
>all run together? or what?

>                  John W. Vinson[MVP]    
>    Come for live chats every Tuesday and Thursday
>http://go.compuserve.com/msdevapps?loc=us&access=public

----------------------------
Ivan Lee
http://www.geocities.com/ginola79/


Sun, 06 Mar 2005 23:09:05 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Clearing RTF data from DAO Meno Field

2. inserting character in an access field by using an update query

3. Wanted - Sample DB2 + ADO Insert using fields collection

4. Replacing Foreign Characters with Local Characters in a Field of a Table

5. Reading Character by Character in a Record Field?

6. Problem with format on insert autotext, and in inserting elements with form fields

7. getting fixed length string with non ascci character (including \0)

8. Values of passing arguments and retrieving sentences including a space character

9. Displaying MS Access fields over 255 characters (Memo fields)

10. Can I include ASCII characters in a string???

11. Read HTML formatted data from database field, Insert Wordmerge fields, and save as Word document

12. Where is the NextLine command

 

 
Powered by phpBB® Forum Software