A
AkAlan via AccessMonster.com
Hi All, I am getting an error when there is an apostrophe in the Comments
text box. I tried using double double quotes in place of the single quotes
but get a different error then. Here is the code I use, thanks for any help.
strSql = "INSERT INTO tblPmiHistory (PmiId,EquipId,Employee,StartDate,
FinishDate,DateSchedOriginal, " _
& " DateSchedCurrent,Comments,TaskId,PerfWc )" _
& " VALUES ('" & Me.PmiId & "','" & Me.EquipId & "','" & Me.Employee
& "','" & Me.StartDate & "','" _
& Me.FinishDate & "','" & Me.DateSchedOriginal & "','" & Me.
DateSchedCurrent & "','" _
& Comments & "','" & Me.TaskId & "','" & Me.txtPerfWc & "'" & ")"
text box. I tried using double double quotes in place of the single quotes
but get a different error then. Here is the code I use, thanks for any help.
strSql = "INSERT INTO tblPmiHistory (PmiId,EquipId,Employee,StartDate,
FinishDate,DateSchedOriginal, " _
& " DateSchedCurrent,Comments,TaskId,PerfWc )" _
& " VALUES ('" & Me.PmiId & "','" & Me.EquipId & "','" & Me.Employee
& "','" & Me.StartDate & "','" _
& Me.FinishDate & "','" & Me.DateSchedOriginal & "','" & Me.
DateSchedCurrent & "','" _
& Comments & "','" & Me.TaskId & "','" & Me.txtPerfWc & "'" & ")"