ACC2000: "Expected: =" When ? Is Omitted in Immediate Window (209930)



The information in this article applies to:

  • Microsoft Access 2000

This article was previously published under Q209930
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

SYMPTOMS

When you use the Immediate window to run a built-in or user-defined function that returns a value, if you don't type a question mark (?) at the beginning of the line, you may receive the following error message:
Expected: =

RESOLUTION

In the Immediate window, type a question mark before the function name when you run a function that returns a value.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open the sample database Northwind.mdb.
  2. Press CTRL+G to open the Immediate Window.
  3. Type Date() in the Immediate window and press ENTER. Note that you receive the following error message.
    Compile error:
    Expected: =
  4. Repeat step 3, but this time type a question mark (?) at the beginning of the Date() function. Note that you receive results instead of an error message.

Modification Type:MajorLast Reviewed:6/24/2004
Keywords:kberrmsg kbprb kbprogramming KB209930