Microsoft KB Archive/114576

From BetaArchive Wiki

PRB: "Attempt to Use FoxPro Function as an Array" in BROWSE

ID: Q114576

The information in this article applies to:

  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, and 2.5b
  • Microsoft FoxPro for MS-DOS, versions 2.5, 2.5a, and 2.5b
  • Microsoft FoxPro for Macintosh, version 2.5b

SYMPTOMS

The following error message occurs during a BROWSE:

   Attempt to use FoxPro function as an array.

CAUSE

A command is being used on a field in the BROWSE.

RESOLUTION

Create a calculated field that uses the command. For an example, see "Workaround" in the "More Information" section below.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

1. Use the CUSTOMER.DBF database file located in the TUTORIAL subdirectory.

   For example, if FoxPro is installed in a directory named FOXPROW on
   drive C, type the following command in the Command window:

      USE C:\FOXPROW\TUTORIAL\CUSTOMER

2. Perform a BROWSE that uses the ALLTRIM() command on a field. For

   example, type the following in the Command window:

      BROWSE FIELDS ALLTRIM(contact)

The error will occur.

Workaround

Use a calculated field that calls the ALLTRIM() command. Instead of the BROWSE command shown in step 2 above, use the following command:

   BROWSE FIELDS TrimContact = ALLTRIM(contact)

Additional reference words: FoxMac FoxDos FoxWin 2.50 2.50a 2.50b errmsg err msg KBCategory: kbprg kberrmsg kbprb KBSubcategory: FxprgBrowse


Last Reviewed: June 27, 1995
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.