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

ID: Q209930


The information in this article applies to:
  • Microsoft Access 2000

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

This article applies to a Microsoft Access database (.mdb) and 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.


  4. Compile error:
    Expected: =
  5. 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.


Additional query words: prb

Keywords : kberrmsg kbprg kbdta
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: May 17, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.