Hello Guys,
My code block is meant to add comments to the current comments. Any idea why the "else" block would be red (Syntax error)?
Thank you
My code block is meant to add comments to the current comments. Any idea why the "else" block would be red (Syntax error)?
Code:
Private Sub cmdUpdateComments_Click()
Dim strInput As String
Dim strComments As String
Dim sqlUpdate As String
Dim d As Date
strComments = Me.Comments.Value
strInput = InputBox("Please enter new comment", "Update Comments")
d = Date
If IsNull(strComments) Then
sqlUpdate = "UPDATE TblStateCorpLic SET [Comments]= '# & d & # & " - " & " & strInput & " '"
Else
sqlUpdate = "UPDATE TblStateCorpLic SET [Comments]=' " & strComments & " & " " & # & d & # & " - " & " & strInput & " ' "
End If
End Sub
Thank you