PRB: Can't Use ActiveForm to Reference Data Control in VB 3.0
Article ID: 101252
Article Last Modified on 1/8/2003
APPLIES TO
- Microsoft Visual Basic 3.0 Professional Edition
This article was previously published under Q101252
SYMPTOMS
Using the ActiveForm Property of the Screen control or an MDI Parent
form to reference a Data control causes a "Type Mismatch" error in
Visual Basic.
CAUSE
This behavior is by design. This is not a bug in Visual Basic. The
Visual Basic environment does not know in advance that the Active form
will actually contain a Data control, so it generates a "Type mismatch"
error.
WORKAROUND
To avoid the error message, use global objects to reference the local
controls. The "More Information" section below demonstrates one method
for doing this.
STATUS
This behavior is by design.
Additional query words: 3.00 errmsg
Keywords: kbprb KB101252