Lawrence Salvucci
asked on
Default text in Memo Field
I need to add some default text to a memo field on my form but not sure how to do that if I need the text on multiple rows with spaced rows in between them. Just not sure how to write that in the "Default Value" property. My memo field has a height of 2" so you can see multiple lines when the form is opened. Can anyone shed some light on this one please?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In a quick test, I tried placing a string of length 1000 characters into the defaultvalue, and that worked.
If there was a limit, I would presume it was at 256 characters. So I think you should be good to use any length strength (within reason).
If there was a limit, I would presume it was at 256 characters. So I think you should be good to use any length strength (within reason).
ASKER
Thank you both for your help! I appreciate it!!
you might want to consider simply using the Current event. Then you could test to determine whether the record is a new record and if so, then populate the particular value you are looking for, something like:
Private Sub Form_Current
if me.newRecord then
me.txt_MemoControl.Value = "line1" & vbcrlf _
& "line2" & vbcrfl & vbcrlf _
& "line3" & vbcrlf _
& "line4"
end if
End Sub
This might be easier to read than simply putting all of that string stuff into the Default Value of the control or the field.
ASKER
Sorry for using the word ROW. I realized that afterwards that it can be confused with records. I meant LINES.