Coding Problem

mrssevans

Registered User.
Local time
Today, 11:11
Joined
Nov 15, 2001
Messages
190
I use some code to add a small header to each note I put in but it is not working very well. Here is what it shows.

Dim intStart As Integer
Me.[F_INotes] = "***" & CurrentUser() & "***" & Now() & Chr(13) & Chr(13) & Chr(13) & Chr(10) & Chr(10) & Chr(10) & Me.[F_INotes]

intStart = Len("***" & CurrentUser() & "***" & Now() & Chr(13) & Chr(13) & Chr(13) & Chr(10) & Chr(10))

'Sets the Cursors Starting Position
Me.[F_INotes].SetFocus
Me.[F_INotes].SelStart

This is putting 2 squares at the end of the date/user/time and one before the next line. This is causing some problems in the notes field because when you start to type the squares sometimes disappear and reset the cursor position. Can anyone help?
 
Chr(13) and Chr(10) are the Carriage Return and Line Feed charecters.

Try using them together such as:

Chr(13) & Chr(10)

or use

vbCRLF

which is the equivelent.
 

Users who are viewing this thread

Back
Top Bottom