Hrmm, dont know if this is right but it sure has me frustrated, Help Please 
Author Message
 Hrmm, dont know if this is right but it sure has me frustrated, Help Please

BillingComments = txtBillingComments & Chr(10) & Chr(13) &
FormatDateTime(Now, vbShortDate) & " - " & txtMiscBillingDescription & " ("
& txtMiscBillingAmount & ")"

This is what I am trying to do with my variable, and it is tied into the
same problem I was having a few weeks ago which still isnt quite fixed but,
whether I insert Chr(10) & Chr(13)  or Chr$(10) & Chr$(13) , my control will
still see it as a little square or my rich text bix will see it as a bolded
pipe.  Now while I know that they are still there in the place of those
symbols, how do I insert a carrage return properly into these fields and
have it be recognized as a carrage return?  then multiline value on my
controls is set to true and still no luck.  This is getting frustrating
because when I manually put the carrage returns into the fields they will
stay.

Should I just run the variables through an encoding and decoding proccess?

Thanks,

Ben Turner



Sun, 28 Jul 2002 03:00:00 GMT
 Hrmm, dont know if this is right but it sure has me frustrated, Help Please

Quote:

> BillingComments = txtBillingComments & Chr(10) & Chr(13) &
> FormatDateTime(Now, vbShortDate) & " - " & txtMiscBillingDescription & " ("
> & txtMiscBillingAmount & ")"

> This is what I am trying to do with my variable, and it is tied into the
> same problem I was having a few weeks ago which still isnt quite fixed but,
> whether I insert Chr(10) & Chr(13)  or Chr$(10) & Chr$(13) , my control will
> still see it as a little square or my rich text bix will see it as a bolded
> pipe.  

FINALLY!!  You posted enough code to see what you're about.  You're
appending a linefeed, then a carriage return, which the TextBox does
*not* interpret as "start a new line, please" - so all it can do is
display some weird symbols for the non-printable characters you're
appending.  Try reversing that order to the correct 'carriage return,
linefeed', or dumping your two Chr functions and replacing them with the
VB constant vbCrLf.
  Hope this helps.
--
Jim in Cleveland
If you're writing to me, in my address
change "REAL_Address.see.below" to "worldnet.att.net"

"What's so funny 'bout peace, love & understanding?"
     - Nick Lowe



Sun, 28 Jul 2002 03:00:00 GMT
 Hrmm, dont know if this is right but it sure has me frustrated, Help Please


Quote:
> BillingComments = txtBillingComments & Chr(10) & Chr(13) &
> FormatDateTime(Now, vbShortDate) & " - " & txtMiscBillingDescription
& " ("
> & txtMiscBillingAmount & ")"

> This is what I am trying to do with my variable, and it is tied into
the
> same problem I was having a few weeks ago which still isnt quite
fixed but,
> whether I insert Chr(10) & Chr(13)  or Chr$(10) & Chr$(13)

<cut>
try: Chr$(13) & Chr$(10)
or: vbCRLF
or: vbNewLine
The order of the characters can be important

--
Please reply via the newsgroup only

Sent via Deja.com http://www.deja.com/
Before you buy.



Sun, 28 Jul 2002 03:00:00 GMT
 Hrmm, dont know if this is right but it sure has me frustrated, Help Please
In part to Ben Turner...
If you are trying to insert a Carriage Return/Line Feed into a string then
that is what you need to insert.  Ie, chr(13) & chr(10).

Chr(10) & Chr(13)   is lf/cr, which is not the same.  If you just want to
insert a cr, then it is only chr(10).  Note the vbCrLf as shown by Phil,
this constant merely mirrors chr(13) & chr(10).

Check out the Ascii chart for further info.

--
Michael D. Cole
Mercury Computer Systems


Quote:
> erm...try RichTextBox1.Text = "BLAH " & vbCrLf & " BLAH " in VB 6 atleast




Quote:
> > BillingComments = txtBillingComments & Chr(10) & Chr(13) &
> > FormatDateTime(Now, vbShortDate) & " - " & txtMiscBillingDescription & "
> ("
> > & txtMiscBillingAmount & ")"

> > This is what I am trying to do with my variable, and it is tied into the
> > same problem I was having a few weeks ago which still isnt quite fixed
> but,
> > whether I insert Chr(10) & Chr(13)  or Chr$(10) & Chr$(13) , my control
> will
> > still see it as a little square or my rich text bix will see it as a
> bolded
> > pipe.  Now while I know that they are still there in the place of those
> > symbols, how do I insert a carrage return properly into these fields and
> > have it be recognized as a carrage return?  then multiline value on my
> > controls is set to true and still no luck.  This is getting frustrating
> > because when I manually put the carrage returns into the fields they
will
> > stay.

> > Should I just run the variables through an encoding and decoding
proccess?

> > Thanks,

> > Ben Turner



Sat, 10 Aug 2002 03:00:00 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. i am having a brainfreeze right now.

2. Need Help Am Frustrated

3. Help:Dont know how to Update destination table

4. Tired...Frustrated..Confused...Please Help

5. REALLY FRUSTRATED. PLEASE HELP

6. Help...Am I heading in the right direction???

7. Simple Question - I am sure

8. New to SQL, easy question I am sure

9. I am sure this is pretty basic...but

10. I am sure this has been answered before

11. Not sure whether this is the right place to ask this question


 
Powered by phpBB® Forum Software