ID: Q117409
The information in this article applies to:
If two sets of one-to-many relationships are set up and two Browse windows are created using fields from both the parent and the child databases, the second Browse window will show the first parent database as having no children even if children do exist.
To illustrate this situation, issue the following commands:
SET DEFAULT TO <FoxPro_directory>\TUTORIAL
USE customer IN 1
USE invoices IN 2
SET ORDER TO TAG cno OF invoices.cdx IN invoices
SET RELATION TO cno INTO invoices ADDITIVE
SET SKIP TO invoices
USE offices IN 3
SELECT 3
USE salesman IN 4
SET ORDER TO TAG ono OF salesman.cdx IN salesman
SET RELATION TO ono INTO salesman ADDITIVE
SET SKIP TO salesman
SELECT 1
DEFINE WINDOW custinv FROM 1,1 TO 20,10
BROWSE WINDOW custinv FIELDS customer.cno, invoices.cno NOWAIT SAVE
SELECT 3
DEFINE WINDOW offsale FROM 1,15 TO 20,25
BROWSE WINDOW offsale FIELDS offices.ono, salesman.ono NOWAIT SAVE
The last Browse window shows OFFICES.ONO with no SALESMAN.ONO fields. This
is incorrect, since there are multiple SALESMAN records with a "1" in the
ONO field. If you scroll the window, the child records will appear. If you
click outside the Browse window and then click the Browse window again, the
child records will disappear. However, the child records will appear and
remain visible if some other record, such as OFFICES.ONO 2, is selected in
the Browse window.
The record pointer for SALESMAN.ONO is at the end of the file (EOF). Once another record is selected in the Browse window, the record pointer for SALESMAN is moved off from the end of the file and the Browse window functions as expected.
To avoid this problem, include the following KEYBOARD command at the end of this program:
KEYBOARD "{PGDN}"
This command repositions the record pointer for the parent database,
OFFICES, and the child database, SALESMAN.
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.
Additional reference words: FoxMac FoxWin 2.50 2.50a 2.50b 2.50c 2.60 buglist2.50 buglist2.50a buglist2.50b buglist2.50c buglist2.60 KBCategory: kbprg kbdisplay kbbuglist KBSubcategory: FxprgBrowse
Last Reviewed: June 27, 1995