Search code examples
sqlms-access

ms access query expression field not accepting IIf expression


im trying to return 1 if null and 0 if not null and when i enter the expression this The error error pops up. heres the expression i wrote :

IIf(IsNull([_characterType]); 0; 1)

The database file (i had to empty it for legal reasons)

(the database was in another language with special characters and i changed all of it to english, that may be the problem but i still dont know how to fix it)

i tried using comma instead of semicolon and got the same result.

when i enter the same exact expression in SQL view it works but when i switch to design view it breaks again.

i tried using external software to fix the database.

i tried importing all of the data to another newly made access file.


Solution

  • Try this for your expression:

    Abs(Not IsNull([_characterType]))