Microsoft KB Archive/131264

{| = BUG: Browse Loses Record Position When Switching Windows Apps =
 * width="100%"|

ID: Q131264

The information in this article applies to:


 * Microsoft FoxPro for Windows, version 2.6a

SYMPTOMS
In a many-to-many browse, pressing ALT+TAB or CTRL+ESC to switch to another Windows-based application and returning to the FoxPro browse causes the record pointer to move away from the record that was selected in the parent table before switching.

RESOLUTION
There is no known alternative solution to this issue at this time.

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
Create and run the following program (.PRG file). The WAIT WINDOW text explains what to do. When you switch to another Windows-based application, switch to something other than another session of FoxPro.

The program code follows this line ********************************************************** *: Program to demonstrate problem with switching out of a *: Many-to-many browse to another windows-based application *: then switching back to the browse. The record pointer in *: the parent table moves. *:

CREATE TABLE trips (tkey c(3),Trip c(25)) CREATE TABLE guides (gkey c(3), Guide c(25)) CREATE TABLE link (tkey c(3),gkey c(3)) IF !USED('trips')

USE trips IN 0 ENDIF SELECT trips INDEX ON tkey TAG tkey IF !USED('guides') USE guides IN 0 ENDIF SELECT guides INDEX ON gkey TAG gkey IF !USED('link') USE link IN 0 ENDIF SELECT link INDEX ON tkey TAG tkey INDEX ON gkey TAG gkey SELECT trips INSERT INTO trips (tkey,trip) values('1','Great Britain') INSERT INTO trips (tkey, trip) values ('2', 'Castles Abroad') INSERT INTO trips (tkey, trip) values ('3', "Europe's Great Cities") INSERT INTO trips (tkey, trip) values ('4', 'Mediteranian Beauties') INSERT INTO trips (tkey, trip) values ('5', 'Scandinavian Holiday') SELECT guides INSERT INTO guides (gkey, guide) values ('1','England') INSERT INTO guides (gkey, guide) values ('2','Scotland') INSERT INTO guides (gkey, guide) values ('3','London') INSERT INTO guides (gkey, guide) values ('4','Paris') INSERT INTO guides (gkey, guide) values ('5','Berlin') INSERT INTO guides (gkey, guide) values ('6','Vienna') INSERT INTO guides (gkey, guide) values ('7','Stockholm') INSERT INTO guides (gkey, guide) values ('8','Copenhagen') INSERT INTO guides (gkey, guide) values ('9','Oslo') INSERT INTO guides (gkey, guide) values ('10','Scandinavia') INSERT INTO guides (gkey, guide) values ('11','Rome') INSERT INTO guides (gkey, guide) values ('12','Madrid') INSERT INTO guides (gkey, guide) values ('13','France') INSERT INTO guides (gkey, guide) values ('14','Spain') INSERT INTO guides (gkey, guide) values ('15','Athens') INSERT INTO guides (gkey, guide) values ('16','Cairo') INSERT INTO guides (gkey, guide) values ('17','Capri') INSERT INTO guides (gkey, guide) values ('18','Constantinople') SELECT link INSERT INTO link (tkey, gkey) values ('1','1') INSERT INTO link (tkey, gkey) values ('1','2') INSERT INTO link (tkey, gkey) values ('1','3') INSERT INTO link (tkey, gkey) values ('2','1') INSERT INTO link (tkey, gkey) values ('2','2') INSERT INTO link (tkey, gkey) values ('2','13') INSERT INTO link (tkey, gkey) values ('2','14') INSERT INTO link (tkey, gkey) values ('2','18') INSERT INTO link (tkey, gkey) values ('3','3') INSERT INTO link (tkey, gkey) values ('3','4') INSERT INTO link (tkey, gkey) values ('3','5') INSERT INTO link (tkey, gkey) values ('3','6') INSERT INTO link (tkey, gkey) values ('3','11') INSERT INTO link (tkey, gkey) values ('3','12') INSERT INTO link (tkey, gkey) values ('3','15') INSERT INTO link (tkey, gkey) values ('4','11') INSERT INTO link (tkey, gkey) values ('4','12') INSERT INTO link (tkey, gkey) values ('4','13') INSERT INTO link (tkey, gkey) values ('4','14') INSERT INTO link (tkey, gkey) values ('4','15') INSERT INTO link (tkey, gkey) values ('4','16') INSERT INTO link (tkey, gkey) values ('4','17') INSERT INTO link (tkey, gkey) values ('4','18') SET ORDER TO TAG tkey SELECT guides SET ORDER TO TAG gkey SELECT trips SET RELATION TO tkey into link SET SKIP TO link SELECT link SET RELATION TO gkey into guides SET SKIP TO guides DEFINE WINDOW tripswin from 8,1 to 30,35 ; title "Trips Abroad" float zoom grow DEFINE WINDOW linkwin from 8,35 to 30,54 ; title "Link" float zoom grow DEFINE WINDOW guidesw from 8,55 to 30,90 ; title "Guide Books" float zoom grow GO TOP BROWSE WINDOW linkwin noedit nowait SELECT guides GO TOP BROWSE WINDOW guidesw noedit nowait SELECT trips GO TOP BROWSE WINDOW tripswin noedit nowait WAIT WINDOW "Select the 3rd bar of Europe's Great Cities Tour" ; +chr(13) ; +"Note the record number"+chr(13) ; +"Then ALT+TAB twice, then note the record number." * ************End of program ************************************* Additional reference words: FoxWin 2.60a buglist2.60a recno pointer KBCategory: kbinterop kbbuglist KBSubcategory: FxinteropGeneral
 * }