We help IT Professionals succeed at work.

Multi Line Text Box

APD Toronto
APD Toronto asked
on
Hi,

I'm trying to generate a table dump in MS Access, and I'm just wondering how can I have a multi-line text box in Access?

Thank you.
Comment
Watch Question

Owner, Dev-Soln LLC
Most Valuable Expert 2014
Top Expert 2010
Commented:
size the textbox for however many lines you want it to be.

Then, select the textbox and view the properties dialog.  On the "Other" tab, there is a property "Enter Key Behavior"; change that value to "New Line In Field".

If the value in that textbox is going to be <=255 characters, you can define it as "TEXT", but if it could be >255, then you should define the data type of the field as MEMO.
APD TorontoSoftware Developer

Author

Commented:
Can you define the textbox as memo even if it is not bound?
APD TorontoSoftware Developer

Author

Commented:
I keep getting:

The setting for this property is too long.
APD TorontoSoftware Developer

Author

Commented:
Or, can you remind me how to write to a .txt file
Most Valuable Expert 2015
Distinguished Expert 2018
Commented:
> .. how to write to a .txt file

That's quite easy using the sample code here:

http://seth.galitzer.net/node/11
http://seth.galitzer.net/files/download/file_io.txt

 /gustav
Scott McDaniel (EE MVE )Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014
Commented:
You can use TransferText to write to your text file:

DoCmd.TransferText acExportDelim, , "YourTable", "YourFile"

https://msdn.microsoft.com/en-us/library/office/ff835958.aspx