new line in memofield

  • Thread starter Thread starter Jean-Paul
  • Start date Start date
J

Jean-Paul

Hi,

I have a memofield on a form where I want to but some text in when
clicking on a checkbox.

First line: Electical
Second line: nothing
Third line: Mechanical

Now I write:

Me!Remarks = "Electrical"

Then I should add 2 Ctrl-enter commands and the add "Mechanical"

Any suggestions?
Thanks
 
Hi Jean-Paul,

try it like this, using vbNewLine to create a new line.

Me!Remarks = "Electrical" & vbNewLine _
& vbNewLine & "Mechanical"


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Great... just what I needed
Hope I get an as usefull answer to my other questions as this one!!!!

JP, Belgium
 
Jean-Paul said:
I have a memofield on a form where I want to but some text in when
clicking on a checkbox.

First line: Electical
Second line: nothing
Third line: Mechanical

Now I write:

Me!Remarks = "Electrical"

Then I should add 2 Ctrl-enter commands and the add "Mechanical"


The VBA Editor does not recognize that.

do it one of these ways:

Me!Remarks = "Electrical" & vbNewLine & vbNewline &
"Mechanical"
or
Me!Remarks = "Electrical" & vbCrLf & vbCrLf & "Mechanical"
or
Me!Remarks = "Electrical" & Chr(13 & Chr(10) & Chr(13 &
Chr(10) & "Mechanical"
 
Back
Top