Invalid Vertical bar error

K

Kim

I have created several expressions using the IIf statement, the only
way I have been able to get them to work is create the statement in the
SQL view
Here is how it looks in SQL view: IIf(main.P8 Is Null,Null,main.folder
& main.P8) AS Photo_8

But each time I try to view in Design View I get an "The expression you
entered has invalid vertical bars"
Here is what it looks like in Design View:
Photo_8: IIf(main.P8 Is Null|Null|main.folder & main.P8)

I have tried to change the Pipes to commas, but then I get another
error "The expression you entered has invalid syntax.

Any ideas? Thanks in advance.

Kim
 
B

Bill Mosca, MS Access MVP

Kim

I don't know if it will make a difference or not, but I always test using
IsNull.Try:
IIF(IsNull(main.P8),Null,main.folder & main.P8) AS Photo_8
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

invalid vertical bar 2
Vertical bar errors 1
Vertical Bar error 1
Aggregate Function Error 0
How to change Number to Text 1
iif is null statement with qualifiers 4
iif Expression Error 6
invalid syntax 5

Top