Code:
CurrentDb.Execute "INSERT INTO RCAData1 (AreaCell, Employee, DefectDate, PartNo, WorkOrderNo, QualityNo, Description, Disposition, Notes, ImmediateAction, ContainmentAction, Why1, Why2, Why3, Why4, Why5, Additional, Category, Type, RootCause, ActionPlan, ActionsTaken, AssignedTo, DueDate, Status, Comments, CompletedDate)" _
& "VALUES ('" & tbxAreaCell & "','" & tbxEmployee.Value & "',#" & Format(tbxDefectDate.Value, "mm/dd/yyyy") & "#,'" & tbxPartNo & "','" & tbxWONo & "','" & tbxQualityNo & "','" & tbxDefectDescription & "','" & tbxDisposition & "','" & tbxNotes & "','" & tbxImmediateAction & "','" & tbxContainment & "','" & tbxWhy1 & "','" & tbxWhy2 & "','" & tbxWhy3 & "','" & tbxWhy4 & " ','" & tbxWhy5 & "','" & tbxWhyAdditional & "','" & cboCategory & "','" & cboType & "','" & tbxRootCause & "','" & tbxActionPlan & "','" & tbxActionTaken & "','" & tbxAssignedTo & "',#" & Format(tbxDueDate.Value, "mm/dd/yyyy") & "#,'" & tbxStatus & "','" & tbxComments & "',#" & Format(tbxCompletedDate.Value, "mm/dd/yyyy") & "#)", dbFailOnError
I am having and issue with some of the tbx's having data with a single quote and some that have (or could have) a direct quote from another person. I have search and read several pieces on dealing with this issue, however they all seem to gear toward one or the other. I cannot find any that deal with both, much less instances where it could have one or both of these, but might not.