Notes Field

R

Ryan Langton

I have several fields that are very large which I currently have defined as
nvarchar(150).
In my Access .adp I would like to be able to allow carriage returns within
these fields. Currently if you hit [Enter] while editing these fields, the
form goes to the next field rather than inserting a carriage return. The
Access controls I'm using are text boxes. Do I need to use a different data
type? Different controls?

Thanks,
Ryan
 
S

Sylvain Lafontaine

Use Ctrl-Enter or set the "Enter Key Behavior" for the field to "New Line in
Field" (under the Other tab).
 
R

Ryan Langton

Thanks Sylvain!
Is there any way to cause the carriage return in my code? For GotFocus(), I
want the cursor to be placed on a new line and add a timestamp to the field.

Ryan

Sylvain Lafontaine said:
Use Ctrl-Enter or set the "Enter Key Behavior" for the field to "New Line
in Field" (under the Other tab).

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF


Ryan Langton said:
I have several fields that are very large which I currently have defined
as nvarchar(150).
In my Access .adp I would like to be able to allow carriage returns
within these fields. Currently if you hit [Enter] while editing these
fields, the form goes to the next field rather than inserting a carriage
return. The Access controls I'm using are text boxes. Do I need to use a
different data type? Different controls?

Thanks,
Ryan
 
S

Sylvain Lafontaine

If (IsNull(Me.t)) Then
Me.t = CStr(Now) + vbCrLf
Else
Me.t = Me.t + vbCrLf + CStr(Now) + vbCrLf
End If

Me.t.SelStart = Len(Me.t.Value)

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF


Ryan Langton said:
Thanks Sylvain!
Is there any way to cause the carriage return in my code? For GotFocus(),
I want the cursor to be placed on a new line and add a timestamp to the
field.

Ryan

Sylvain Lafontaine said:
Use Ctrl-Enter or set the "Enter Key Behavior" for the field to "New Line
in Field" (under the Other tab).

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF


Ryan Langton said:
I have several fields that are very large which I currently have defined
as nvarchar(150).
In my Access .adp I would like to be able to allow carriage returns
within these fields. Currently if you hit [Enter] while editing these
fields, the form goes to the next field rather than inserting a carriage
return. The Access controls I'm using are text boxes. Do I need to use
a different data type? Different controls?

Thanks,
Ryan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top