Syntax Error

  • Thread starter Thread starter Thomas
  • Start date Start date
T

Thomas

I started out with Access 97 and I'm now using Access
2000. I have a lot of queries written under Access 97 and
they work fine under Access 2000. Problem is: when I try
to change or ad to the query I get a "Syntax Error". Here
is an example of such a query:

COMP: IIf([TMH ZAV]![XMASCARD96]=1'[COMPANY]'IIf([TMH
ZAV]![XMASCARD96]=2'""))

What am I missing???

Thanks for any help I can get
TMH
 
HI:

Do you have a copy of the original Access '97 database? If so, you'll want
to import each query into Ver. 2000. The conversion process from '97 to
'2000 is not always 100 % compatible. Some reports may behave oddly too.

regards
 
What you posted doesn't make any sense.

The conversion might have messed up or you might have transcribed
incorrectly from you code to the post, especially (I think) the
single-quotes should be commas as list/argument separators required for the
Iif() function.

Even if the I assume the single-quotes are commas (as argument separator),
the second Iif() requires an extra argument. Iif() requires 3 arguments.
Please check Access VB Help on the Iif() function.
 
Dear Van

Thank you very much for your reply. FYI, the "formula" as
I posted it is 1:1 the one I have in my query. What's so
odd is that it works perfectly fine in access 2000 - I
just can't make any changes anymore without getting a
syntax error.

I will follow your suggestion and check the VB Help.

Again, many thanks for your help.
Thomas
-----Original Message-----
What you posted doesn't make any sense.

The conversion might have messed up or you might have transcribed
incorrectly from you code to the post, especially (I think) the
single-quotes should be commas as list/argument separators required for the
Iif() function.

Even if the I assume the single-quotes are commas (as argument separator),
the second Iif() requires an extra argument. Iif() requires 3 arguments.
Please check Access VB Help on the Iif() function.

--
HTH
Van T. Dinh
MVP (Access)



I started out with Access 97 and I'm now using Access
2000. I have a lot of queries written under Access 97 and
they work fine under Access 2000. Problem is: when I try
to change or ad to the query I get a "Syntax Error". Here
is an example of such a query:

COMP: IIf([TMH ZAV]![XMASCARD96]=1'[COMPANY]'IIf([TMH
ZAV]![XMASCARD96]=2'""))

What am I missing???

Thanks for any help I can get
TMH


.
 
Dear Bill

Thanks for your help. Unfortunately I don't have the
original anymore. But I'm sure you're right. the
conversion from 97 to 2000 must have NOT gone very
smoothly.

With best regards
Thomas
-----Original Message-----
HI:

Do you have a copy of the original Access '97 database? If so, you'll want
to import each query into Ver. 2000. The conversion process from '97 to
'2000 is not always 100 % compatible. Some reports may behave oddly too.

regards

I started out with Access 97 and I'm now using Access
2000. I have a lot of queries written under Access 97 and
they work fine under Access 2000. Problem is: when I try
to change or ad to the query I get a "Syntax Error". Here
is an example of such a query:

COMP: IIf([TMH ZAV]![XMASCARD96]=1'[COMPANY]'IIf([TMH
ZAV]![XMASCARD96]=2'""))

What am I missing???

Thanks for any help I can get
TMH


.
 
As I pointed out in my earlier reply, there are TWO problems with the
expression you posted. I am surprised that it worked previously???
 
Back
Top