PRB: Error Message: "No bars have been defined for this popup"Last reviewed: June 27, 1995Article ID: Q128815 |
The information in this article applies to:
SYMPTOMSIf the PROMPT FIELD clause of a DEFINE POPUP command contains empty records, the following error message occurs:
No bars have been defined for this popup CAUSEThis error can be caused by any one of the following:
RESOLUTIONCheck for the following:
STATUSThis behavior is by design.
MORE INFORMATIONIn some cases it may be necessary to check for empty records before defining and activating the popup. The code provided below uses the _TALLY system memory variable to determine if the result of an SQL SELECT command is greater than one before it populates the popup. Add the following code after the SQL SELECT command:
IF _TALLY < 1 WAIT WINDOW "No Records Available" ELSE *(insert DEFINE POPUP command line) *(insert ACTIVATE POPUP command line) ENDIF Steps to Reproduce BehaviorCreate and run the following program:
*** Begin Program *** CLOSE DATABASES USE C:\FPW26\TUTORIAL\CUSTOMER SET FILTER TO state = "nc" && 'nc' must be in lowercase DEFINE POPUP cities FROM 5,5 TO 15,25 PROMPT FIELD city SCROLL ACTIVATE POPUP cities DEACTIVATE POPUP cities SET FILTER TO CLOSE DATABASES *** End Program ***In this program, the State field in the Customer table contains all uppercase characters, so no records match the filter condition. This results in an empty work area. There are no values to populate the popup, so the error message ("No bars have been defined for this popup") occurs when the popup is defined and activated. You can modify the program to produce the same error using the SQL SELECT statement. For example, change the SET FILTER TO command line into a comment. Then below that command line, add this code:
SELECT * FROM customer WHERE state = "nc" INTO CURSOR tempNOTE: When the current work area points to the temporary table (Temp) rather than the permanent table (Customer), the PROMPT FIELD clause will read the values of temp.city to populate the popup. This behavior is different from the SET FILTER command, which reads its values from customer.city. The error also occurs if no records have been added to the permanent table or if the records in the permanent table have been removed using the ZAP, PACK, or DELETE (if SET DELETED is ON) commands.
|
Additional reference words: FoxWin FoxDos 2.50 2.50a 2.50b 2.60 2.60a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |