cvCrLf in a string

schumarg

Registered User.
Local time
Today, 11:58
Joined
May 13, 2003
Messages
94
Hi,

Is it possible to have a vbCrLf inside a string.

What I'm trying to do is have one string print out as such:

Amex Number 1234 1234123 1234
Mr. Robet Jones
123 Anywhere St.
City, ST 19111

thanks,
 
I do it to message boxes all the time. So I would assume the answer is yes. Try it and see.
 
I do it to message boxes all the time. So I would assume the answer is yes. Try it and see.
 
Hi,

Since I got it, another thing came up.

The alignment is not quite right. Is it possible to align a text field. I've found ref to a string (stText) but it's not working with a text field. What I'm getting looks like this:

(part of code is -- & " Line item 1 :" & Space(4) & [Item1Q] & vbTab & [txt1U] & Space(4) & [txt1D]

Line item 7 : 4 ea Teeth
Line item 8 : 4000 ft String
Line item 9 : 5 ea Brush
Line item 10 : 500 ft Wire

Would like to "Right Align" the qty so it would look like this"

Line item 7 : 4 ea Teeth
Line item 8 : 4000 ft String
Line item 9 : 5 ea Brush
Line item 10 : 500 ft Wire


thanks again,
 
I am not exactly sure as to what you are asking but, you can set the text align property of the text box to "Right".

Also, I dont think you can have all that information show up in a single text box. I think you will need to use multiple text boxes or maybe a list box.

Please try to be more specific with your question and I might be able to help you better.
 
The previous post didn't come out right.

Should be:

Would like to "Right Align" the qty so it would look like this"

Line item 7 : ___4 ea Teeth
Line item 8 : 4000 ft String
Line item 9 : ___5 ea Brush
Line item 10 : 500 ft Wire

(without the lines)
 
If those two bits of information are in their own text boxes, then just set their Text Align properties to "Right"

Other wise, I don't really know.
 
Would it be possible for you to attatch you db so I can see exactly what you want to do?
 
Hi,

Would you like to post here, or send it directly to you.

Thanks,
 
just post it. That way other people might be able to help.
 
got it now, db attached
 
Last edited:
Is that in Access 97. I can't make changes to it, but you can. I think I know what you are trying to do, correct me if I am wrong:

You want the fields Item1Q, Item2Q etc to be aligned so that whether the number shows 4 or 4000, it always stays to the far right of the field... Correct?

If this is the case, simply:

Open the form in design view

Double click the field Item1Q, The fields property sheet will appear

Scroll down the property sheet till you see "Text Align"

Cahnge this setting to "Right"

Close the sheet.

Follow these steps for each field (Item1Q - Item10Q)

Now no matter how large the number, it will always appear in the most right hand part of the field.


You can also do this to only right align every other field if that is all you want, but I wouldn't recommend it.
I hope this answers your question. If not, Just say so.
 
I tried that already, made sence, but when it sends in the email the alignment is as other fields.

Line item 1 : 1 ea test
Line item 2 : 10 ea test
Line item 3 : 100 ea test
 
Bob,

In the BeforeUpdate event of your control put:

Code:
Dim ptr As Integer

ptr = Instr(1, Me.YourControl, " ")
Me.YourControl = Space(5 - ptr) & Me.YourControl

That would pad all leading numerics to five places.

Wayne
 
Hi,

Thanks, but I've found that when the text goes to the email app it doesn't make a difference how it appears in Access.

I got it to right align with RSet, and thought I had it, but when it went to the email app, it changed alignment.

Thanks,
 
Bob,

To align things like this you need a fixed-pitch font like
Courier. Most apps support it, but don't generally use it.

Wayne
 
Wayne,

You did it!! It works.

Now, the one question left. How do I get my messages to open in someone elses email with a Couier font.

Nothing is easy.

Thanks,
 

Users who are viewing this thread

Back
Top Bottom