Hi there!
Thanks so much to Giorgio and Michael who replied to my posting yesterday.
I was given an excellent suggestion yesterday on how to streamline my
queries and was given the following suggestion to run the following 6 queries
in my code:
Update tblFinalData
SET GSTRatio = IIF(IsNull([GSTRation]),0,GSTRatio), _
HSTRatio = IIF(IsNull(HSTRatio),0,HSTRatio), _
QSTRatio = IIF(IsNull(QSTRatio),0,QSTRatio), _
Wildcard1 = IIF(IsNull(Wildcard1),"Empty",Wildcard1), _
Wildcard2 = IIF(IsNull(Wildcard2),"Empty",Wildcard2), _
Wildcard3 = IIf(IsNull(Wildcard3), "Empty", Wildcard3)
However, I get an "Expected End of Statement" error with the comma before
the line continuation character being highlighted in the second row of this
code. Am I missing a bracket somewhere or a comma or are there too many
commas? I've tried this with and without the line continuation character and
it still doesn't seem to work.
Thanks!
JR

Signature
www.brightfuture.ca/bright
My email address can be found on my site.
John Vinson - 16 Nov 2005 17:27 GMT
>Hi there!
>
[quoted text clipped - 16 lines]
>commas? I've tried this with and without the line continuation character and
>it still doesn't seem to work.
Where are you running this? VBA and SQL are two different languages,
and the query engine doesn't understand VBA, while the VBA compiler
doesn't know SQL. It looks like you're trying to execute this SQL
query from VBA. Won't work!
Put it (without the underscores, which are not used in SQL) into the
SQL window of a new query and it should work fine.
John W. Vinson[MVP]
Ofer - 16 Nov 2005 18:22 GMT
Are you using this SQL in a query?
If so, remove the _ from the Ens of the line
Update tblFinalData
SET GSTRatio = IIF(IsNull([GSTRation]),0,GSTRatio),
HSTRatio = IIF(IsNull(HSTRatio),0,HSTRatio),
QSTRatio = IIF(IsNull(QSTRatio),0,QSTRatio),
Wildcard1 = IIF(IsNull(Wildcard1),"Empty",Wildcard1),
Wildcard2 = IIF(IsNull(Wildcard2),"Empty",Wildcard2),
Wildcard3 = IIf(IsNull(Wildcard3), "Empty", Wildcard3)

Signature
I hope that helped
Good Luck
> Hi there!
>
[quoted text clipped - 20 lines]
>
> JR