Try #IIF(qryCustomer.allareas, DE('All Areas'), DE('#ValueList(qryAreas.Name)#'))#
Havent tested it but it should work... The downside of using an IIF() against an if() statement is that the true and false sections are always evaluated... Whereas a normal if statement if its true the false is not looked at... HTH -----Original Message----- From: Ruslan Sivak [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 8, 2002 22:25 To: CF-Talk Subject: iif usage Hi, I'm having a problem with iif. If I do #iif(qryCustomer.allareas,DE("All Areas"),DE("#ValueList(qryAreas.name,', ')#"))# and qryCustomer.allareas is true, therefore qryAreas is undefined (I check for it with an cfif somewhere else), then I get an error "Parameter 1 of function ValueList which is now "qryAreas.name" must be pointing to a valid query name" If I make it #iif(qryCustomer.allareas,DE("All Areas"),DE("ValueList(qryAreas.name,', ')"))# then it works fine in this case, but fails when qryCustomer.allareas is false as it doesn't evaluate the ValueList(qryAreas.name,', ') What am I doing wrong? Russ ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists