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).
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
(http://support.microsoft.com/kb/194022/EN-US/
)
INFO: Visual Studio 6.0 Service Packs, What, Where, Why
194295
(http://support.microsoft.com/kb/194295/EN-US/
)
HOWTO: Tell That a Visual Studio Service Pack Is Installed
To download the latest Visual Studio service pack, visit the following Microsoft Web site:
On Windows 95, Windows 98, or Windows Me, create a new Visual Basic Standard EXE project. Form1 is created by default.
Place a Command button on Form1.
Paste the following code into the code window of Form1:
Option Explicit
Private Sub Command1_Click()
Unload Me
End Sub
From the Project menu, choose Add MDI Form. MDIForm1 is added by default.
From the Project menu, choose Properties, and change the Startup object to MDIForm1.
From the Tools menu, choose Menu Editor.
Add the following two menu items:
Caption: "Show Report 1" ; Name: mnufileshow1
Caption: "Show Report 2" ; Name: mnufileshow2
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
From the Project menu, select Add Data Environment.
Set the properties of the connection to use the sample database, NWIND.MDB:
On the Provider tab, set Provider = Microsoft Jet OLE DB Provider.
Click Next.
On the Connection tab, set the database name to NWIND.MDB.
Click Test Connection to make sure that you are connected to the Database.
Click OK.
Add a Command button to Connection1.
Set the properties of Command1 to use the Employees table:
Right-click on Command1 and select Properties.
On the General tab, change the Database object to Table.
From the Object Name combo box, select Employees.
Click OK.
From the Project menu, select Add Data Report. DataReport1 is added by default.
Set the following properties for DataReport1:
Set the MDIChild property to True.
Set the DataSource property to DataEnvironment1.
Set the DataMember property to Command1.
From the Project menu, select Add Data Report. DataReport2 is added by default.
Set the following properties for DataReport2:
Set the MDIChild property to True.
Set the DataSource property to DataEnvironment1.
Set the DataMember property to Command1.
Save the project.
From the File menu, choose Make Project1.exe.
Go to Windows Explorer and double-click on Project1.exe.
Click on menu item Show Report 1. Form1 is shown. Click on Command1 to close it. DataReport1 is shown. Close it.
Click on the menu item Show Report 2. Form1 is shown. Click on Command1 to close it. The IPF occurs at the point.