Receiving error message 3061 when trying to submit changes. When I hit the Debug button, it goes to the below highlighted code:
End If
' execute sql to update record in Tbl_PubData using form data
' PK_pubData, PrintID, PK_pubData, PubType, PubSubType, PubSubTypeOther, Frequency, FrequencyDate, Division, HighProfile, FK_Lifecycle, FK_PubWeb, ProjectLead, LeadEditor, LeadDesigner, EconEditor, AudLoc, ExtAudType, ExtAudOther, Client
Dim PubDataSQL As String
If IsNull(TextComments) Then
TextComments = ""
End If
PubDataSQL = "UPDATE Tbl_PubData SET " & _
"PubName = '" & Replace(TextPubName, "'", "''") & "', " & _
"FK_PubType = '" & ComboPubType & "', " & _
"FK_PubSubType = '" & ComboPubSubType & "', " & _
"Spanish = " & CheckSpanish & ", " & _
"PubSubTypeOther = '" & Replace(TextPubSubTypeOther, "'", "''") & "', " & _
"FK_Frequency = '" & ComboFreq & "', " & _
"FrequencyCycle = '" & ComboFreqCyc & "', " & _
"FK_Division = '" & ComboDiv & "', " & _
"HighProfile = '" & ComboHighProfile & "', " & _
"FK_ProjectLead_Lkp_DeptStaff = '" & ComboProjectLead & "', " & _
"FK_LeadEditor_Lkp_DeptStaff = '" & ComboLeadEditor & "', " & _
"FK_LeadDesigner_Lkp_DeptStaff = '" & ComboLeadDesigner & "', " & _
"FK_EconEditor_Lkp_EconEditors = '" & ComboEconEditor & "', " & _
"FK_Client_Lkp_contacts = '" & ComboClient & "', " & _
"Comments = '" & Replace(TextComments, "'", "''") & "', " & _
"PubCost = '" & TextPubCost & "', " & _
"FK_LeadWebDesigner_Lkp_DeptStaff = '" & ComboLeadWDesigner & "', " & _
"FK_LeadWebEditor_Lkp_DeptStaff = '" & ComboLeadWEditor & "' " & _
"WHERE PK_PubData = " + LkpPK_PubData + ";"
[highlight]CurrentDb.Execute PubDataSQL[/highlight]
End Sub
End If
' execute sql to update record in Tbl_PubData using form data
' PK_pubData, PrintID, PK_pubData, PubType, PubSubType, PubSubTypeOther, Frequency, FrequencyDate, Division, HighProfile, FK_Lifecycle, FK_PubWeb, ProjectLead, LeadEditor, LeadDesigner, EconEditor, AudLoc, ExtAudType, ExtAudOther, Client
Dim PubDataSQL As String
If IsNull(TextComments) Then
TextComments = ""
End If
PubDataSQL = "UPDATE Tbl_PubData SET " & _
"PubName = '" & Replace(TextPubName, "'", "''") & "', " & _
"FK_PubType = '" & ComboPubType & "', " & _
"FK_PubSubType = '" & ComboPubSubType & "', " & _
"Spanish = " & CheckSpanish & ", " & _
"PubSubTypeOther = '" & Replace(TextPubSubTypeOther, "'", "''") & "', " & _
"FK_Frequency = '" & ComboFreq & "', " & _
"FrequencyCycle = '" & ComboFreqCyc & "', " & _
"FK_Division = '" & ComboDiv & "', " & _
"HighProfile = '" & ComboHighProfile & "', " & _
"FK_ProjectLead_Lkp_DeptStaff = '" & ComboProjectLead & "', " & _
"FK_LeadEditor_Lkp_DeptStaff = '" & ComboLeadEditor & "', " & _
"FK_LeadDesigner_Lkp_DeptStaff = '" & ComboLeadDesigner & "', " & _
"FK_EconEditor_Lkp_EconEditors = '" & ComboEconEditor & "', " & _
"FK_Client_Lkp_contacts = '" & ComboClient & "', " & _
"Comments = '" & Replace(TextComments, "'", "''") & "', " & _
"PubCost = '" & TextPubCost & "', " & _
"FK_LeadWebDesigner_Lkp_DeptStaff = '" & ComboLeadWDesigner & "', " & _
"FK_LeadWebEditor_Lkp_DeptStaff = '" & ComboLeadWEditor & "' " & _
"WHERE PK_PubData = " + LkpPK_PubData + ";"
[highlight]CurrentDb.Execute PubDataSQL[/highlight]
End Sub