473,378 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Multiline in Access 2007? Need a line feed on a text box.

68
I'm building a window to show a log at the completion of each process.
Ex "6/15/2011 8:27:56 PM IMPORT COMPLETE"
I need a line feed in my text box (so I can list them) and using Chr(13) returns the paragraph box but not the line feed. I've looked this up already and everywhere it says that you need to set the text box multiline property to true.
I'm in access 2007 and can't find it.
What am I missing?
Jun 16 '11 #1

✓ answered by Stewart Ross

You need to use a carriage return and line feed (Chr(13) and Chr(10)) together. If you are inserting your Chr(13) using the AfterUpdate event, say, then you can either add & Chr(10) to your current line, or, more simply, use the constant provided by VBA for this purpose to replace your Chr(13):

Me!YourTextBox = Me!YourTextBox & vbCrLf

to add a line space after the current line.

Please note that the vb constant is not available outside of the VBA environment (it cannot be used in expressions in the properties box of a control, for example).

The multi-line property you mention applies to data entry via the keyboard, not to display of existing text - textboxes will display multiple lines without further alteration to their properties as long as the lines are separated by true line breaks (CR & LF sequences).

-Stewart

2 8990
Stewart Ross
2,545 Expert Mod 2GB
You need to use a carriage return and line feed (Chr(13) and Chr(10)) together. If you are inserting your Chr(13) using the AfterUpdate event, say, then you can either add & Chr(10) to your current line, or, more simply, use the constant provided by VBA for this purpose to replace your Chr(13):

Me!YourTextBox = Me!YourTextBox & vbCrLf

to add a line space after the current line.

Please note that the vb constant is not available outside of the VBA environment (it cannot be used in expressions in the properties box of a control, for example).

The multi-line property you mention applies to data entry via the keyboard, not to display of existing text - textboxes will display multiple lines without further alteration to their properties as long as the lines are separated by true line breaks (CR & LF sequences).

-Stewart
Jun 16 '11 #2
dk4300
68
I had forgotten about the Chr(10) part, but I'll use the vbCrLf from now on.
Thank you!!
Jul 6 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Captain Frog | last post by:
Hi All, Could anyone tell or point me to the correct syntax for a carriage return and line feed? I've tried vocal in a fixed size array and all I get is a single line text box even though the...
49
by: Allen Browne | last post by:
If you are looking for opinon on what's useful in Access 2007, there's a new article at: http://allenbrowne.com/Access2007.html Covers what's good (useful features), what's mixed (good and bad),...
2
by: Ashish Gupta | last post by:
I have an Access 2007 database with formatted text stored in memo. I want to display it in VB 6 form. Binding the database to richtextbox just displays html code. Pls suggest how do I go about it. ...
16
by: Neil | last post by:
I posted a few days ago that it seems to me that the Access 2007 rich text feature does not support: a) full text justification; b) programmatic manipulation. I was hoping that someone might...
1
by: Kev | last post by:
Hello, Can someone tell me if Access 2007 can wrap the datasheet column heading like Excel does? I know I can do it in continuous form view but I would prefer to use a datasheet. Am wondering...
4
by: lupo666 | last post by:
Hi everybody, this time I have three problems driving me nuts :-((( (1) I have a report with 20 or so Yes/No "squares". Is there a way to either hide/show the "square" or change the yes/no...
1
by: Nalaka | last post by:
Hi, We are sending SMS messages using our ASDP.net site (C# code).... How do I add a "Line Feed" character to the string that we are sending? Any help is deeply appreciated Thanks Nalaka
2
by: Reedsp | last post by:
I have a Access 2000 formated database that I am testing the functionality of the database in Access 2007. One line of code of visual basic code in not working in a module. The line is: ...
7
by: Icarus | last post by:
I have a Access 2000 database that I am opening with Access 2007. When I open the datbase in Access 2000 or Access 2003, the database runs as expected. In Access 2007 my main form opens, a...
8
by: union51 | last post by:
In Access 2007, I have a query it has 2 collumns one is "Location" and the other is titled "Activity". Lets say "Location" has 2 choices "Here" or "There". While "Activity" has several that can be...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.