Re: Error 3122 You tried to execute a query that does not include

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: John Vinson (jvinson_at_STOP_SPAM.WysardOfInfo.com)
Date: 11/27/04


Date: Fri, 26 Nov 2004 17:18:21 -0700

On Fri, 26 Nov 2004 15:05:02 -0800, Steven Cheng
<StevenCheng@discussions.microsoft.com> wrote:

>There should be a null value as the fields are calculated fields to ensure
>that there isn't a value:
>
>Job: =iif([TempJobCode]="",[HomeJobCode],[TempDepartmentCode]).

A zero length string is NOT the same as NULL. The string constant ""
is a specific, defined value - a string of zero length. NULL, on the
other hand, means "this field is undefined, unknown, it could be
anything".

Try

Job: IIF(IsNull([TempJobCode]), ,[HomeJobCode], [TempDepartmentCode])

                  John W. Vinson[MVP]
             Join the online Access Chats
        Tuesday 11am EDT - Thursday 3:30pm EDT
      http://community.compuserve.com/msdevapps



Relevant Pages

  • Re: Weird Query
    ... I'd withdrawn $100 from the account and my receipt said I had $0.00 ... known zero value and an unknown value. ... there is a big *practical* difference between a known zero ... length string and an unknown string. ...
    (comp.databases.oracle.misc)
  • REPRESENT revisited
    ... Forth-94 has few floating point display functions [none in the ... If u is greater than zero the character string shall consist ... If u is zero the string shall consist of one digit representing ...
    (comp.lang.forth)
  • Re: Reproducing java calculations in UNIX
    ... quotient goes in x, also a double. ... is greater than zero) only the fractional part of the ... {fraction is 52 zero bits, ... is converted from string to floating point (string ...
    (comp.unix.shell)
  • Re: REPRESENT revisited
    ... >has given rise to implementations that differ in critical ... The required compatibility is 1), but 2) makes it much easier to get ... > If u is zero the string shall consist of one digit representing ... But I think it is a very bad idea if a word that should fill a string ...
    (comp.lang.forth)
  • Re: Allow Zero Length String Property - 2000 vs 2003
    ... Are you the same person who posted the 'Allow Zero Length String in MS ... "Ash" wrote in message ...
    (microsoft.public.access.tablesdbdesign)