• Undefined function

    Author
    Topic
    #371075

    Undefined function

    Viewing 1 reply thread
    Author
    Replies
    • #588826

      Yet another missing References problem

    • #588841

      I’ve seen that message when there was something wrong with the punctuation of an expression, parens out of place, etc. Then it will look at anything that comes after what it sees as the end of the expression and say “Huh? I don’t recognize that!” Your Nz expression doesn’t return an empty string as a default, so if it is null, you should NOT see “Open”, and the NumberOfDays function will probably fail also. That may be your problem. If providing a default in the Nz expression doesn’t cure it, try changing the expression inside the Right() function to a simple string and see if it still complains about the Right() function.

      • #588874

        Hi Charlotte

        You said

        “Ttry changing the expression inside the Right() function to a simple string and see if it still complains about the Right() function”

        How do I cheange this to simple string?

        Days: IIf(Nz([Certificate])=””,”Open”,Right(” ” & NumberOfDays([Begin],[Certificate],True),4))

        Thanks, John

        • #588880

          What Charlotte means is something like this:
          Days: IIf(Nz([Certificate])=””,”Open”,Right(” ” & “abcdef”))
          If this is working you have a problem with the NumberOfDays function and not with the Right function.

          • #588919

            Close, Francois, but you left out the number of characters in the Right function.

            Days: IIf(Nz([Certificate])=””,”Open”,Right(” ” & “abcdef”,4))

            I also suspect that a Null [Certificate] may be part of the problem, since that’s being fed into the NumberOfDays function as well. Might also want to try this:

            Days: IIf(Nz([Certificate], “”)=””,”Open”,Right((” ” & NumberOfDays([Begin],[Certificate],True)),4))

            • #588928

              Hi Charlotte & Francoisl

              I got the following from another board:

              If you created the database on an SR-1 machine and then try to run it on a
              “plain vanilla” one, the internal version numbers of the librarieswon’t
              match, even if all the names are the same and in the same sequence. You
              must unset and reset the references on the customer machine and recompile.

              I did’nt mention this to you,does this sound like the culprit?

              John

            • #588940

              Since I’m on the loung a had a number of “US” database that I look at.
              I never had that problem.
              I have Office 2000 Developer Edition English International with SR1.
              I you want you can attach the db or send it to me by email (see my profile) and I’ll test it.

            • #588953

              confused I have no idea which libraries they’re talking about, so I can’t advise you. Of course, they may be talking about later versions of ADO, but that’s really a different issue.

              Were you trying to run your query on a plain vanilla machine? Like Francois, I haven’t run into this problem, but in any case it shouldn’t apply if both machines are running SR-1. shrug

            • #589038

              Hi All

              I originally created the db and query on SR-1 (9.0.3821) machine and it worked.

              I copied it to a customers machine that had,

            • #588985

              i would suggest you get down to the simplest test possible.
              Go to the immediate window in VBA editor and type

              ?right(“abcdef”,3)

              which should reply

              def

              if it does there is nothing wrong with Right() and you need to dig deeper as Charlotte suggested

    Viewing 1 reply thread
    Reply To: Undefined function

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: