Automatic Entry in a memo Field

MarionD

Registered User.
Local time
Today, 23:08
Joined
Oct 10, 2000
Messages
425
Hi there - I hope someone can help me here!

I have a memo field on a form and a button named "Today"

Every time the button is clicked it should "move" the contents of the memo field down and insert the date and user name at the top, then position the cursor at the end of this entry

e.g.

17.07.2003 (user name from my table):
cursor should be here now

16.07.2003 (Marion)
this was the last entry

15.07.2003 (Marion)
this was the second last entry

I have it more or less working with the following code but the CR and LF keep showing up as little blocks! Any help would really be appreciate!

Me.MEMOFIELD = Date & " (" & DLookup("[sachbearbeiter]", "SBTbl") & "):" & vbCr & vbLf & vbLf & Me.MEMOFIELD
Me.MEMOFIELD.SetFocus
Me.MEMOFIELD.SelStart = 16 + Len(DLookup("[sachbearbeiter]", "SBTbl"))
If Me.MEMOFIELD > "" Then
Me.Parent.Seite79.Caption = "Notizen vorhanden"
Me.Parent.Seite79.Picture = CurrentProject.path & "\Ausrufezeichen.bmp"
Else
Me.Parent.Seite79.Caption = "Keine Notizen"
Me.Parent.Seite79.Picture = ""

End If
 
Replace the vbcr's and vblf's with CHR(13) and CHR(10) respectively.
 
Hi Travis,

Thanks for the reply - Ive tried the chr(13) and chr(10) but they also display the "little block" entry instead of "just doing it"

Marion
 
Hi there Jack,

Always good to hear from you - and again you're my hero - works just fine! Don't know why vbCrLf should work differently to vbcr & vblf but I'm past worrying - just as long as it does!


Thanks a ton
Marion
 
YEEHAA! I am glad that it did the trick for you... And I am glad you are past worrying!

Always nice to hear from you and I hope this finds you well and getting rich!

Jack
 

Users who are viewing this thread

Back
Top Bottom