G
Guest
Okay. This one has got me. Maybe someone, here, can offer another
suggestion...
Here's the code:
Dim Visit1 as String
Dim Visit2 as String
Visit1 = me.txtVisitDescription
Visit2 = Replace(Visit1, "'", "''")
DoCmd.RunSQL ("update tblsitevisits set visitdesc = '" & Visit2 & "' where
servicecall = txtservicecall and sitevisitnumber = txtlastsitevisit;")
The result is that the Update does not take.
I have stepped through, with warnings...run debug...and substituted values.
No warnings; empty debug window; and any configuration of substituted values
works.
I have even found that, after the first time stepping through, with
substituted values in a series of 6 SQL statements, each SQL statement works,
and the offending SQL will begin to work. Run without stepping through the
statements, or remove the substituted value statements, and the original SQL
again doesn't populate the field.
Anyone want to take a shot at this?
Thanks.
Sharkbyte
suggestion...
Here's the code:
Dim Visit1 as String
Dim Visit2 as String
Visit1 = me.txtVisitDescription
Visit2 = Replace(Visit1, "'", "''")
DoCmd.RunSQL ("update tblsitevisits set visitdesc = '" & Visit2 & "' where
servicecall = txtservicecall and sitevisitnumber = txtlastsitevisit;")
The result is that the Update does not take.
I have stepped through, with warnings...run debug...and substituted values.
No warnings; empty debug window; and any configuration of substituted values
works.
I have even found that, after the first time stepping through, with
substituted values in a series of 6 SQL statements, each SQL statement works,
and the offending SQL will begin to work. Run without stepping through the
statements, or remove the substituted value statements, and the original SQL
again doesn't populate the field.
Anyone want to take a shot at this?
Thanks.
Sharkbyte