Hi Everyone,
I'm new to access and to vba for access. I found the following code that I have used in my modified Issues Template that MS offers with Access. The code allows me to add new comments to an existing list of comments, unfortunately I dont know how to make the code automatically add a blank line before adding a new comment.
I have tried eiditing the code by adding vbCrLf and vbNewLine to the bold portion of the code below
Private Sub IndirectDataInput_Click()
If IndirectDataInput.Caption = "New Comment" Then
TempDataBox.Visible = True
TempDataBox.SetFocus
IndirectDataInput.Caption = "Save Comment"
Else
IndirectDataInput.Caption = "New Comment"
If IsNull(Me.Description) Then
If Len(Me.TempDataBox) > 0 Then
Me.Description = Now() & "" & Me.TempDataBox
Me.TempDataBox = ""
TempDataBox.Visible = False
Else
TempDataBox.Visible = False
End If
Else
If Len(Me.TempDataBox) > 0 Then
Me.Description = Me.Description & Now() & Me.TempDataBox
Me.TempDataBox = ""
TempDataBox.Visible = False
Else
TempDataBox.Visible = False
End If
End If
End If
End Sub