Annie Courchesne, CMA
accma at sympatico.ca
Thu Apr 16 22:02:58 CDT 2009
Hi everyone, I'm having a problem with a function that a customer wants. It's for making quotation. I have a subform that has the lines of the quote. On another subform, I have a list of words. When I double click on the word, it adds it wherever the pointer was in the lines of the quotes. So far, no problem with that. Now here's the problem : If the text has a ' in it (exemple : Stone wall of 20' x 10'), I try to run add "White" in front of the text, it does not work. Here the code I use : Dim txt as string Txt=me.word & " " & me.description SQL = "UPDATE tblSoumissionDetail SET tblSoumissionDetail.Description = '" & txt & "' WHERE (((tblSoumissionDetail.SoumDetailID)=" & Me.Parent.LigneID & "));" DoCmd.RunSQL SQL Me.word : White Me.description : Stone wall of 20' x 10' In an exemple as this one, I get a runtime error 3075. I know it's because of the ' . but I have no idea how to solve this! Anyone can help? Thanks! Annie