FIX: Placing MsgBox in SelChange Event of DataGrid Causes IPF (223066)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q223066 SYMPTOMS
A Msgbox function placed in the SelChange event for a DataGrid causes a run-time Application Error that terminates Visual Basic.
Using Windows NT, you get the following error:
The instruction at "0x24ce5280" referenced memory at "0x000c0158". The memory could not be "read".
Click OK to terminate the application.
Click on CANCEL to debug the application.
Using either Windows 95 or Windows 98, you get this error:
VB6 caused an invalid page fault in module MSDATGRD.OCX at 0137:24ec5280.
CAUSE
This bug occurs if a record selector is clicked while the DataGrid's internal edit mode is set to True. You can explicitly set the internal edit mode to True, using DataGrid.EditActive = True. In addition, the internal edit mode can be set to True implicitly, by changing the focus. The MsgBox function causes a change of focus.
RESOLUTION
This behavior no longer occurs with the version of the DataGrid that ships with Visual Basic 6.0 Service Pack 3.
STATUSMicrosoft 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 Visual Studio 6.0 Service Pack 3.
For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:
194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why
194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
Modification Type: | Major | Last Reviewed: | 11/4/2003 |
---|
Keywords: | kbBug kbfix kbVS600sp3fix KB223066 kbAudDeveloper |
---|
|