-
How do I insert a line return in an unbound text box
Hello everyone,
I am using an unbound text box in access 2007 and I need to create a line return in that box. Meaning I need to enter the fields name in the box control source code so the output will look as follows:
Dewberry, Inc.
1234 Oxford St,
Suite 309
Lahnam, MD 20706
Thanks for the help.
-
-
Morning...how do I code it in. I have never used that variable before. Do I use the unbound text box control code or the VBA editor.
-
You gave two possible ways to use this variable. What was the result of your two tests? BTW, vbLF gets its name from Visual Basic, Line Feed (or new line).
-
Thanks for the definition.
As I said, I have never used the variable "vbLF" before. I was asking if I can use it in an unbound text box or should I use it in the VBA editor windows?
Right now I have an unbound text box that I used to format the employee name, title and phone number (i.e: John Doe, Manager 555-555-1234). The code used in the control source of the unbound text box is: =[Firnam] & " " & [Lasnam] & "," [Titl] & " " & [Phonb].
Can I use that same code to format the address and add in the "vbLF" variable? If yes, what code do I use?
Thanks.
-
What I'm trying to do is help you figure this out for yourself. If you have a variable (really a constant), that will produce a line-feed, where could you put it in code you already have?
BTW, vbCRLF would be a better constant to use in this case. vbCRLF is equal to (the same as) what happens when you press the "Enter" key within a text field. "CRLF" stands for Carriage Return, Line Feed. I'm really hoping you will try a few things on your own based on this information.
-
Thanks GolferGuy. Will work with it and see what I get.
-
Problem solved using the following string:
Me.textboxname = Me.[CyNam] & vbCrLf & Me.[CySt] & "," & Me.[CySteNb] & vbCrLf & Me.[CyCity] & "," & Me.[CySta] & " " & Me.[CyZip]
Thanks for the help.
-
Excellent job! I do hope it was helpful to you that I did not give you the answer, but let you experience the joy of personal discovery.
-
Morning...Yes. Thank you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|