Appending to a memo field in form textbox

mcbass1

Registered User.
Local time
Today, 04:04
Joined
Sep 7, 2007
Messages
41
I have a form with a comments textbox that links to a memo filed in a table. I have an unbound textbox for the users input, and afterupdate, I concatenate the input to what was in the comments textbox.

It is working the way I want it to, except it carriage returns even on the first entry. I don't want a blank line to start off with, but I can't get rid of it.

The code I'm using:

Private Sub inputtxt_AfterUpdate()
Dim priorcomments As Variant
If Not IsNull([Receiver Comments]) Then
priorcomments = [Receiver Comments]
[Receiver Comments] = priorcomments & vbCrLf & Time() & " - H710 - " & inputTxt
Else
[Receiver Comments] = Time() & " - H710 - " & inputTxt
End If
inputTxt = Null
priorcomments = Null
End Sub

Screen shot included

Any help you can provide will be very much appreciated.
Thanks in advance,
Mike
 

Attachments

I figured it out.

I had to check if [Receiver Comments]<>"" instead of checking if not null.
Thanks anyway.
 
The lesson is better learned if you solve it yourself. ;) Thanks for letting us know it was resolved.
 

Users who are viewing this thread

Back
Top Bottom