If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
skipping lines
This is a simple question. Yesterday I needed help with adding date, time and user to a textbox. Today I am wondering if there is a way to make the info skip a line then add the text instead of adding it directly after the first line. The code is as follows:
Private Sub Command4_Click() Notes = Notes & Chr(10) & " " & CurrentUser & " " & " " & Date & " " & " " & Time & " " & " " & [NewNote] End Sub And the output looks like this: admin 08/06/2004 9:23 am test test test admin 08/06/2004 9:24 am test test test admin 08/06/2004 9:25 am test test test and so, for no matter how long I keep going. Is there a way to make it look like this: admin 08/06/2004 9:23 am test test test admin 08/06/2004 9:24 am test test test admin 08/06/2004 9:25 am test test test Thanks in advance, Dennis |
#2
|
|||
|
|||
skipping lines
I think the CHR(10) is a carriage return. Just put two of them.
Rick B "Problem from yesterday" wrote in message ... This is a simple question. Yesterday I needed help with adding date, time and user to a textbox. Today I am wondering if there is a way to make the info skip a line then add the text instead of adding it directly after the first line. The code is as follows: Private Sub Command4_Click() Notes = Notes & Chr(10) & " " & CurrentUser & " " & " " & Date & " " & " " & Time & " " & " " & [NewNote] End Sub And the output looks like this: admin 08/06/2004 9:23 am test test test admin 08/06/2004 9:24 am test test test admin 08/06/2004 9:25 am test test test and so, for no matter how long I keep going. Is there a way to make it look like this: admin 08/06/2004 9:23 am test test test admin 08/06/2004 9:24 am test test test admin 08/06/2004 9:25 am test test test Thanks in advance, Dennis |
#3
|
|||
|
|||
skipping lines
Hmmmm. That did not work.
I am looking for the right code for a line feed. Rick B "Problem from yesterday" wrote in message ... This is a simple question. Yesterday I needed help with adding date, time and user to a textbox. Today I am wondering if there is a way to make the info skip a line then add the text instead of adding it directly after the first line. The code is as follows: Private Sub Command4_Click() Notes = Notes & Chr(10) & " " & CurrentUser & " " & " " & Date & " " & " " & Time & " " & " " & [NewNote] End Sub And the output looks like this: admin 08/06/2004 9:23 am test test test admin 08/06/2004 9:24 am test test test admin 08/06/2004 9:25 am test test test and so, for no matter how long I keep going. Is there a way to make it look like this: admin 08/06/2004 9:23 am test test test admin 08/06/2004 9:24 am test test test admin 08/06/2004 9:25 am test test test Thanks in advance, Dennis |
#4
|
|||
|
|||
skipping lines
Chr(13) & Chr(10)
Will insert a line feed. You might want... Notes = Notes & Chr(13) & Chr(10) & Chr(13) & Chr(10)& CurrentUser & " " & " " & Date & " " & " " & Time & Chr(13) & Chr(10) &[NewNote] Rick B "Problem from yesterday" wrote in message ... This is a simple question. Yesterday I needed help with adding date, time and user to a textbox. Today I am wondering if there is a way to make the info skip a line then add the text instead of adding it directly after the first line. The code is as follows: Private Sub Command4_Click() Notes = Notes & Chr(10) & " " & CurrentUser & " " & " " & Date & " " & " " & Time & " " & " " & [NewNote] End Sub And the output looks like this: admin 08/06/2004 9:23 am test test test admin 08/06/2004 9:24 am test test test admin 08/06/2004 9:25 am test test test and so, for no matter how long I keep going. Is there a way to make it look like this: admin 08/06/2004 9:23 am test test test admin 08/06/2004 9:24 am test test test admin 08/06/2004 9:25 am test test test Thanks in advance, Dennis |
#5
|
|||
|
|||
skipping lines
note that you don't need those double spaces as two strings...
Notes = Notes & Chr(13) & Chr(10) & Chr(13) & Chr(10)& CurrentUser & " " & Date & " " & Time & Chr(13) & Chr(10) &[NewNote] Rick B "Rick B" wrote in message ... Chr(13) & Chr(10) Will insert a line feed. You might want... Notes = Notes & Chr(13) & Chr(10) & Chr(13) & Chr(10)& CurrentUser & " " & " " & Date & " " & " " & Time & Chr(13) & Chr(10) &[NewNote] Rick B "Problem from yesterday" wrote in message ... This is a simple question. Yesterday I needed help with adding date, time and user to a textbox. Today I am wondering if there is a way to make the info skip a line then add the text instead of adding it directly after the first line. The code is as follows: Private Sub Command4_Click() Notes = Notes & Chr(10) & " " & CurrentUser & " " & " " & Date & " " & " " & Time & " " & " " & [NewNote] End Sub And the output looks like this: admin 08/06/2004 9:23 am test test test admin 08/06/2004 9:24 am test test test admin 08/06/2004 9:25 am test test test and so, for no matter how long I keep going. Is there a way to make it look like this: admin 08/06/2004 9:23 am test test test admin 08/06/2004 9:24 am test test test admin 08/06/2004 9:25 am test test test Thanks in advance, Dennis |
#6
|
|||
|
|||
skipping lines
Use this: vbCrLf
|
Thread Tools | |
Display Modes | |
|
|