Access: Data Type Mismatch using boolean function in query criteria

Posted by BenV on Stack Overflow See other posts from Stack Overflow or by BenV
Published on 2010-06-16T01:24:40Z Indexed on 2010/06/16 1:32 UTC
Read the original article Hit count: 359

I have a VBA function IsValidEmail() that returns a boolean. I have a query that calls this function: Expr1: IsValidEmail([E-Mail]). When I run the query, it shows -1 for True and 0 for False. So far so good.

Now I want to filter the query to only show invalid emails. I'm using the Query Designer, so I just add a value of 0 to the Criteria field. This gives me a "Data Type Mismatch" error. So does "0" (with quotes) and False. How am I supposed to specify criteria for a boolean function?

© Stack Overflow or respective owner

Related posts about ms-access

Related posts about ms-access-2007