G
Guest
I am having a problem with the Update method. When I am using numbers, it
works fine. However when I am using words, it has syntax errors. It appears
to error out when there are apostrophie's in the words. I am using it in an
open form. Here is the code:
CurrentDb.Execute "UPDATE [Master_tbl] " & _
"SET [Master_tbl].[Second Name] = " & [Forms]![Name_frm]![Second
Name].[Value] & " Wheren ID = " & Me.ID & "; "
If the name has an apostrophie (ie..."Ryan's Place"), it causes a syntax
error. However when there is a number (ie..."615") it replaces the old value
fine. Is there anyone out there that knows how to fix this problem?
works fine. However when I am using words, it has syntax errors. It appears
to error out when there are apostrophie's in the words. I am using it in an
open form. Here is the code:
CurrentDb.Execute "UPDATE [Master_tbl] " & _
"SET [Master_tbl].[Second Name] = " & [Forms]![Name_frm]![Second
Name].[Value] & " Wheren ID = " & Me.ID & "; "
If the name has an apostrophie (ie..."Ryan's Place"), it causes a syntax
error. However when there is a number (ie..."615") it replaces the old value
fine. Is there anyone out there that knows how to fix this problem?