Yes I have tried that. The errors I am getting are two. First this one:
Closing delimiter not found for the string beginning at postition 831 in the
command. The string begins with: ')} AS [tblTest4].
The second is this error:
Err.Source =
Err.Number = 80040E14
Err.Description =
The two always come together. The second is my attempt at error handling.
Or it finds nothing or it hangs. There are ' for the field in the database
so not sure what more to try.
--
George Hester
_________________________________
Sorry George,
I don't understand either of those errors. The first, referring to position
831, leads me to suspect that the problem might lie with the contents of
qryAuthor, which you are inserting into your sSql string. I suggest you try
some debug.print statements to find out exactly what the various strings are
evaluating to, and perhaps try cutting/pasting those strings from the
immediate window into a query and running it, to see what happens then.
Other than that, there's nothing else I can think of at the moment.
Rob
> Yes I have tried that. The errors I am getting are two. First this one:
>
[quoted text clipped - 46 lines]
>> > George Hester
>> > _________________________________
George Hester - 16 Jan 2008 03:40 GMT
Hi Rob. I figured it out finally. It turns out Find also exhibits this
issue. I thought it only came up in my definition of sSQL used in the query.
But the issue will also arise in the Find command used in my DAP. So I had
to just do something like this:
qryAuthor = Replace(qryAuthor,"'","''")
and that fixed it. I was spending all my time looking at the sSQL thinking
that was where the issue was. It was but I didn't realize that the
single-quote issue also comes up in the Find I was using. Wll that one's
done. Thanks for your help.
--
George Hester
_________________________________
> Sorry George,
>
[quoted text clipped - 59 lines]
> >> > George Hester
> >> > _________________________________