Microsoft KB Archive/175443: Difference between revisions
(importing KB archive) |
m (Text replacement - ">" to ">") |
||
Line 93: | Line 93: | ||
count = 4 | count = 4 | ||
If lastcount | If lastcount > 0 Then | ||
For i = lastcount - 1 To 1 Step -1 | For i = lastcount - 1 To 1 Step -1 | ||
Unload text1(i) | Unload text1(i) | ||
Line 99: | Line 99: | ||
End If | End If | ||
If count | If count > 0 Then | ||
For i = 1 To count - 1 | For i = 1 To count - 1 | ||
Load text1(i) | Load text1(i) |
Revision as of 09:34, 21 July 2020
Article ID: 175443
Article Last Modified on 6/28/2004
APPLIES TO
- Microsoft Visual Basic 4.0 Standard Edition
- Microsoft Visual Basic 4.0 Professional Edition
- Microsoft Visual Basic 4.0 32-Bit Enterprise Edition
This article was previously published under Q175443
SYMPTOMS
An application error occurs when a Visual Basic program dynamically creates a text box bound to a remote data control or a data control.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in Visual Basic, version 5.0.
MORE INFORMATION
This section shows you how to reproduce the bug in Visual Basic 4.0 using a data control. You can substitute a remote data control for a data control and still reproduce the behavior.
Steps to Reproduce Behavior
- Start 32-bit Visual Basic 4.0 or, if it is already running, click New Project on the File menu.
Add the following controls to Form1 and set the following properties to the appropriate controls:
Control Default Name Property Setting --------------------------------------------------------------- Command Button Command1 Data Data1 DatabaseName Biblio.mdb RecordSource Authors Text Box Text1 DataSource Data1 Index 0
Copy the following code to the Code window of Form1:
Option Explicit Private Sub Form_Load() Command1.Caption = "For Remote Data Control" End Sub Private Sub Command1_Click() Dim count As Integer Dim i As Integer Static lastcount As Integer Data1.Refresh count = 4 If lastcount > 0 Then For i = lastcount - 1 To 1 Step -1 Unload text1(i) Next i End If If count > 0 Then For i = 1 To count - 1 Load text1(i) text1(i).Left = text1(0).Left + (i * 1335) text1(i).Visible = True Next i End If lastcount = count End Sub
- On the Run menu, click Start or press the F5 key to start the program. Each time you click the command button, three text boxes appear. On the third click, an application error occurs displaying one of the following messages and Visual Basic ends:
Windows NT 3.51:
Windows 95:
-and-
Windows 98:
-or-
Additional query words: ipf gpf crash kbTextBox
Keywords: kbbug kbfix kbvbp500fix KB175443