I have a SQL query setup with the following in the where clause:
(((people.mailout)=CBOOL([Wants Mailout (True or False) or Leave Blank for All])) Or ([Wants Mailout (True or False) or Leave Blank for All] Is Null))
It works if you enter True or False in the parameter, but if you leave it blank it returns an error message about the query being in error or too complex.
I have been using:
(((people.mailout) Like [Wants Mailout (True or False) or Leave Blank for All]) Or ([Wants Mailout (True or False) or Leave Blank for All] Is Null))
for basic text type fields which works fine except when I get to a field thats true/false, which is why I changed Like to = and then wrapped it in Cbool to convert it to a boolean. I am guessing that the problem is that the Null value is being converted to 'false' by the cbool? Not sure what else could be wrong there.
Thanks for any insight.
Cul
(((people.mailout)=CBOOL([Wants Mailout (True or False) or Leave Blank for All])) Or ([Wants Mailout (True or False) or Leave Blank for All] Is Null))
It works if you enter True or False in the parameter, but if you leave it blank it returns an error message about the query being in error or too complex.
I have been using:
(((people.mailout) Like [Wants Mailout (True or False) or Leave Blank for All]) Or ([Wants Mailout (True or False) or Leave Blank for All] Is Null))
for basic text type fields which works fine except when I get to a field thats true/false, which is why I changed Like to = and then wrapped it in Cbool to convert it to a boolean. I am guessing that the problem is that the Null value is being converted to 'false' by the cbool? Not sure what else could be wrong there.
Thanks for any insight.
Cul