Microsoft KB Archive/195972

= BUG: Data Report Not Always in WindowList =

Article ID: 195972

Article Last Modified on 1/8/2003

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q195972



SYMPTOMS
An MDIFORM does not show the child form in the WindowList menu if the child form is a Data Report. If the Data Report is minimized and then returned to a normal state, it will show up in the WindowList.



RESOLUTION
To work around this problem, add code to your program that minimizes the report prior to opening the report in normal mode. Refer to the Steps to Reproduce Behavior section of this article for sample code on this workaround.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.



Steps to Reproduce Behavior
 Create a new standard EXE project. Form1 is created by default. Add an MDIFORM to the project. Add a menu to the form, and check the WindowList property, as follows:

     Caption: View Name: mnuView

 Add a Data Report to the project and then add a Data Environment. Set the Datasource property and the Datamember property. You don't have to drop any fields onto the report in order to see the problem. Set the MDICHILD property to True on Form1 and DataReport1.</li> Add a CommandButton to Form1 and, in the Click event, show the DataReport (DataReport1.Show).</li>  Run the application. If you select the View menu, Form1 shows up. Click the CommandButton and select the View menu again. Note that the DataReport is not listed in the WindowList.

If you modify the Click event of the CommandButton to do the following, the DataReport appears in the WindowList as expected: Private Sub Command1_Click DataReport1.Visible = False DataReport1.WindowState = vbMinimized

DataReport1.WindowState = vbNormal DataReport1.Show End Sub

</li></ol>

Keywords: kbbug kbreportwriter KB195972

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.