All after carriage return from text area not imported.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a webform used to notify us of new hires. When the form is submitted,
the information is stored in an Access database. I have two texarea fields
on the form that are written to memo fields in the database. One is used for
capturing the person's address and the other for general comments. The only
data that makes it to the db is everything up to the first carriage return.
For example:

10901 120th Avenue
New York, NY
10009

The only thing that would be stored would be 10901 120th Avenue
 
Try using the Replace Function:
MyString = Replace(MyString, vbCrLf, " ")
Every carriage return will be replaces with a space. Be aware the Access
Constant is = Chr(13) & Chr(10). If it doesn't work, you may need to
determine what character they are using. Use the Asc() function to find the
numeric value to use.
 
I apologize, but I'm somewhat of a novice at scripting. Where would I use the
replace function?
 
Without knowing exactly what you are doing, I can't be positive, but I would
try putting some code in the Current event of the form and in the Before
Update event of the form:

Me.MyTextFieldOne = Replace(Me.MyTextFieldOne, vbCrLf, " ")
Me.MyTextFieldTwo = Replace(Me.MyTextFieldTwo, vbCrLf, " ")
 
Just a thought, here Alex. If you have a multiline string in memo field
and you view it in a table or query datasheet, you will normally only
see the first line. To see more, increase the row height of the
datasheet, or display the data in a form with a textbox bound to the
memo field.
 
Well, I'm an idiot. That was the problem. Sorry to all, I should have
caught that before troubling anyone. Thanks for your assistance.
 
Back
Top