Microsoft KB Archive/153312

= ACC95: "Cannot Find Function" Error Msg Using Timer in a Macro =

Article ID: 153312

Article Last Modified on 7/5/2002

-

APPLIES TO


 * Microsoft Access 95 Standard Edition

-



This article was previously published under Q153312



Moderate: Requires basic macro, coding, and interoperability skills.



SYMPTOMS
When you run a macro, you may receive the following error message:

The expression you entered has a function name that Microsoft Access can't find.



CAUSE
The macro may contain a reference to the Timer function. This reference can exist either in the condition column of the macro or in an argument of one of the macro actions.



RESOLUTION
Create the following Visual Basic for Applications function. This function will return the value of the Timer function. Next, replace all references in your macro(s) with calls to this new function.

  Public Function MyTimer As Single MyTimer = Timer End Function



STATUS
Microsoft has confirmed this to be a problem in Microsoft Access version 7.0. This problem no longer occurs in Microsoft Access 97.



Steps to Reproduce Problem
 Open the sample database Northwind.mdb.  Create a new macro with the following properties:

     Action: RunCode

Function Name: Timer  Run the Macro. Note that you receive the error message described in the "Symptoms" section.</ol>

<div class="references_section">