Microsoft KB Archive/165056

= ACC97: Compile Error Using Derived Math Functions in Help =

Article ID: 165056

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q165056



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



SYMPTOMS
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.



Steps to Reproduce Behavior
 Start Microsoft Access and open any database. Search the Help Index for "derived math functions." 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. Press CTRL+C to copy the selected text.  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 </li> On the Debug menu, click Compile Loaded Modules. Note that you receive the error message:

Compile error:

Syntax error

</li> 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.</li></ol>

Keywords: kbusage KB165056

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.