Microsoft KB Archive/108671

{| = BUG: Filtered POPUP Displays Improperly =
 * width="100%"|

ID: Q108671

2.50 2.50a 2.50b 2.60 2.60a | 2.50b

WINDOWS                    | MACINTOSH kbdisplay kbprg kbbuglist The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6, 2.6a
 * Microsoft FoxPro for Macintosh, version 2.5b

SYMPTOMS
When you move to the bottom of a popup based on a filtered set of data, there appear to be a series of blank lines. If you move the highlight bar, additional records appear in the popup. When you move to the very top of the popup, a record that is not in the filter condition will appear. This is the record prior to the first record in the filter condition. These symptoms will also appear in an @ ... GET-List that is based on a filtered popup.

NOTE: This display problem does not occur in FoxPro for MS-DOS.

WORKAROUND
One workaround to this problem is to replace the following code

SET FILTER TO listitem="This is test2" with an SQL-SELECT command that creates a temporary cursor on which the popup is based. For example: SELECT * FROM testlist ; WHERE testlist.listitem="This is test2" ; INTO CURSOR tmptable

STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Steps to Reproduce Problem
1. Copy the following code into a program and execute it:

*\\ Create a temporary table CREATE CURSOR testlist (listitem C(20))

*\\ Insert 770 records with a value of "This is a test" FOR i = 1 TO 770 INSERT INTO testlist (listitem) ; VALUES ("This is a test") ENDFOR

*\\ Insert 770 records with a value of "This is test2" FOR i = 1 TO 770 INSERT INTO testlist (listitem) ; VALUES ("This is test2") ENDFOR

*\\ Set a filter for records containing "This is test2" SET FILTER TO listitem="This is test2"

*\\ Define and activate the popup DEFINE POPUP listpop ; FROM 2, 1 TO 15,20 ; PROMPT FIELD listitem ; SCROLL

ACTIVATE POPUP listpop 2. Move to the bottom of the visible list of records in the popup. You should see a blank area. If you use the mouse to highlight the bar following the last visible record, another record becomes visible. Several of these "invisible" records may become visible as you highlight them. 3. Move to the top of the list of records. A blank line should appear as  the first "record" in the list. If you use the mouse to highlight this bar, you should see "This is a test." This record should not appear because it is outside the filter condition. NOTE: When the number of iterations in both FOR loops is changed from 770 to 502, the problem does not occur. When the value in one of the FOR loops is changed from 502 to 503, the problem occurs. This seems to indicate that the problem is related to the number of records in the table. However, when tested on different machines, the number of iterations needed in the FOR loops to resolve the problem varied. Additional reference words: FoxMac FoxWin 2.50 2.50a 2.50b list listbox empty 2.60 2.60a buglist2.50 buglist2.50a buglist2.50b buglist2.60 buglist2.60a KBCategory: kbdisplay kbprg kbbuglist KBSubcategory: FxprgSql

Keywords         : FxprgSql kbbuglist Version          : 2.50 2.50a 2.50b 2.60 2.60a | 2. Platform         : MACINTOSH WINDOWS
 * }