Comment Box to copy to the rest of my queried records

Jass7869

Registered User.
Local time
Today, 14:32
Joined
Aug 12, 2014
Messages
96
Here is my code...if I take out the where statement..it copies the remarks all the way down my table to all the records...with the where statement..it's prompting in for parameters..

Private Sub Remarks1_Click()
Dim strMsg As String, strQry As String, strRemark As String

strMsg = "Update All Comments in the Current view. IMPORTANT!!! Will update a the Viewed records."

If vbYes = MsgBox(strMsg, vbYesNo, "IMPORTANT!! Confirmation") Then
strMsg = "Please enter the remark"

strRemark = InputBox(strMsg, "Remark")

If Len(strRemark) > 0 Then
strQry = "Update Final_Table From Remarks1 = Remarks1 & '--" & strRemark & "' where [Final_frm].cboCostCenter = [Final_Table Query1].tboCostCen"
QuickQry strQry, False
Me.Requery
End If
Else
MsgBox "Action cancelled."
End If

End Sub
 
Try

strQry = "Update Final_Table From Remarks1 = Remarks1 & '--" & strRemark & " where " & [Final_frm].cboCostCenter & " = " & [Final_Table Query1].tboCostCen"

Variables should almost never be included withing string. Your tic mark (') was not balanced and not required here.
 
I am getting a syntax error now...please help!!! I just want it copy the remarks in the Comment box to the rest of my queried records
 

Users who are viewing this thread

Back
Top Bottom