Thanks for the reply.
I tried your suggestion but the loldver variable is a Long datatype so
doesn't need any quotes, and I've tried changing 0 to False but that still
fails.
I'm at a loss now.....
> Hi,
> Yor main problem is the quote/doublequote.
[quoted text clipped - 27 lines]
> > Thanks in advance
> > Dom
Harrie_Nak - 29 Apr 2005 22:57 GMT
What you can do is create a query in the Design View.
Test it, and if it works, go to the SQL view.
From there you can copy and paste it in your code.
(in reversed order you can use this to test your code).
regards,
Albert
> Thanks for the reply.
> I tried your suggestion but the loldver variable is a Long datatype so
[quoted text clipped - 35 lines]
>> > Thanks in advance
>> > Dom
Van T. Dinh - 01 May 2005 11:49 GMT
There may be problems with reserved words (even though I can't find anything
from the list of reserved words). Try square brackets anyway, like:
strSQL = "UPDATE [tbl_Versions] AS T SET T.[Current] = 0 " & _
" WHERE T.[VersionIndex] = " & loldver

Signature
HTH
Van T. Dinh
MVP (Access)
> Thanks for the reply.
> I tried your suggestion but the loldver variable is a Long datatype so
> doesn't need any quotes, and I've tried changing 0 to False but that still
> fails.
> I'm at a loss now.....