ACC97: Compile Error Using Derived Math Functions in Help (165056)



The information in this article applies to:

  • Microsoft Access 97

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.

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.

Modification Type:MajorLast Reviewed:9/27/2003
Keywords:kbusage KB165056