ACC97: Compile Error Using Derived Math Functions in Help

Last reviewed: April 1, 1997
Article ID: Q165056
The information in this article applies to:
  • Microsoft Access 97

SYMPTOMS

Novice: Requires knowledge of the user interface on single-user computers.

In the Microsoft Access 97 Help topic "derived math functions," a compile error occurs when you copy and paste some of the functions containing a minus sign (-) into a module.

CAUSE

Help uses ASCII character 0150 for the minus sign instead of the correct ASCII character 0045.

RESOLUTION

After you paste a code example into a module, use the keyboard to manually retype all of the minus signs.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start Microsoft Access and open any database.

  2. Search the Help Index for "derived math functions."

  3. Locate the Inverse Hyperbolic Cosine function in the Function column, and then select everything to the right of the equal sign (=) in the Derived equivalents column.

  4. Press CTRL+C to copy the selected text.

  5. Create a new module and type the following procedure. Paste the function from Help where indicated:

          Function TestMinus()
    
             Dim X As Integer
             X = 5
             ' On the next line, type X = and then press CTRL+V to paste
             X = Log(X + Sqr(X * X - 1)
          End Function
    
    

  6. On the Debug menu, click Compile Loaded Modules. Note that you receive the error message:

          Compile error:
          Syntax error
    

  7. Retype the minus sign in the expression X = Log(X + Sqr(X * X - 1), and then repeat step 6. Note that the compile error does not occur.


Keywords : DcmHlp kbusage
Version : 97
Platform : WINDOWS
Hardware : x86
Issue type : kbdocerr


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 1, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.