Microsoft KB Archive/257786

= FIX: IPF in Msvbvm60.dll When Showing a Data Report After a Modal Form =

Article ID: 257786

Article Last Modified on 8/7/2007

-

APPLIES TO

 Microsoft Visual Basic 6.0 Professional Edition, when used with:  Microsoft Windows 95

 Microsoft Windows 98 Standard Edition

 Microsoft Windows Millennium Edition  Microsoft Visual Basic 6.0 Enterprise Edition, when used with:  Microsoft Windows 95</li></ul>

 Microsoft Windows 98 Standard Edition</li></ul>

 Microsoft Windows Millennium Edition</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q257786

<div class="symptoms_section">

SYMPTOMS
On Windows 95, Windows 98, or Windows Me, a Visual Basic application has a multiple-document interface (MDI) form. Click on a menu item on the MDI form to show a modal form, and then unload it. Show a data report, and then unload it. Then, click on another menu item on the MDI form to show a modal form, unload it, and then show another data report. The program crashes at this point with an Invalid Page Fault in msvbvm60.dll. This problem only occurs in the compiled exe and runs as expected in the Visual Basic integrated development environment (IDE).

<div class="status_section">

STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in the latest service pack for Visual Studio 6.0.

For additional information about Visual Studio service packs, click the following article numbers to view the articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That a Visual Studio Service Pack Is Installed

To download the latest Visual Studio service pack, visit the following Microsoft Web site:

http://msdn2.microsoft.com/en-us/vstudio/Aa718353.aspx

<div class="moreinformation_section">

Steps to Reproduce Behavior
<ol> On Windows 95, Windows 98, or Windows Me, create a new Visual Basic Standard EXE project. Form1 is created by default.</li> Place a Command button on Form1.</li>  Paste the following code into the code window of Form1: Option Explicit

Private Sub Command1_Click Unload Me End Sub </li> From the Project menu, choose Add MDI Form. MDIForm1 is added by default.</li> From the Project menu, choose Properties, and change the Startup object to MDIForm1.</li> From the Tools menu, choose Menu Editor.</li> Add the following two menu items:  Caption: "Show Report 1" ; Name: mnufileshow1</li> Caption: "Show Report 2" ; Name: mnufileshow2</li></ul> </li> <li> Paste the following code into the code window of MDIForm1: Option Explicit

Private Sub mnufileshow1_Click Form1.Show vbModal DataReport1.Show End Sub

Private Sub mnufileshow2_Click Form1.Show vbModal DataReport2.Show End Sub </li> <li>From the Project menu, select Add Data Environment.</li> <li>Set the properties of the connection to use the sample database, NWIND.MDB: <ol style="list-style-type: lower-alpha;"> <li>On the Provider tab, set Provider = Microsoft Jet OLE DB Provider.</li> <li>Click Next.</li> <li>On the Connection tab, set the database name to NWIND.MDB.</li> <li>Click Test Connection to make sure that you are connected to the Database.</li> <li>Click OK.</li></ol> </li> <li>Add a Command button to Connection1.</li> <li>Set the properties of Command1 to use the Employees table: <ol style="list-style-type: lower-alpha;"> <li>Right-click on Command1 and select Properties.</li> <li>On the General tab, change the Database object to Table.</li> <li>From the Object Name combo box, select Employees.</li> <li>Click OK.</li></ol> </li> <li>From the Project menu, select Add Data Report. DataReport1 is added by default.</li> <li>Set the following properties for DataReport1: <ul> <li>Set the MDIChild property to True.</li> <li>Set the DataSource property to DataEnvironment1.</li> <li>Set the DataMember property to Command1.</li></ul> </li> <li>From the Project menu, select Add Data Report. DataReport2 is added by default.</li> <li>Set the following properties for DataReport2: <ul> <li>Set the MDIChild property to True.</li> <li>Set the DataSource property to DataEnvironment1.</li> <li>Set the DataMember property to Command1.</li></ul> </li> <li>Save the project.</li> <li>From the File menu, choose Make Project1.exe.</li> <li>Go to Windows Explorer and double-click on Project1.exe.</li> <li>Click on menu item Show Report 1. Form1 is shown. Click on Command1 to close it. DataReport1 is shown. Close it.</li> <li>Click on the menu item Show Report 2. Form1 is shown. Click on Command1 to close it. The IPF occurs at the point.</li></ol>

Additional query words: sp4

Keywords: kbbug kbfix kbreportwriter kbvs600sp4fix kbvs600sp5fix KB257786

-

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

© Microsoft Corporation. All rights reserved.