Bob Heygood
bheygood at abestsystems.com
Sun Nov 18 14:26:37 CST 2007
Thanks to all who were up early and replied. I got an answer from one of the folks here in the hood (San Diego). It was just a matter of adding a line to my code in my function. See answer below: GetScope2Code = IIf(Scope2Code = "", Null, Scope2Code) Funny I just read an old Advisor with an article about the use/understanding/misunderstanding of nulls. I think it was penned by one of our frequent contributors. Here then too is another reason nulls are important; for statistical/counting/... purposes. Best, Bob -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Sunday, November 18, 2007 12:09 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Outputing nulls in query with function I think I totally misunderstand your response then. Someone was trying to use a vb constant in a query expression and I said you couldn't do that. I had always thought you couldn't use vb constants outside of a module until you responded with the global comment. Maybe I'm just confusing two different threads. If so, I apologize. Susan H. > Susan, > > No, AFAIK you cannot use any constant directly in a query, even if it > is global. you could call a function which returns a variant though. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com