ACC2000: Access Methods That Reset The Visual Basic Project (198637)
The information in this article applies to:
This article was previously published under Q198637 Advanced: Requires expert coding, interoperability, and multiuser skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
SYMPTOMS
When you use certain Access methods that modify modules or references, all
variables in the same Visual Basic for Applications project are reset.
You reset your variables with the following methods:
AddFromFile (Module Object)
AddFromFile (References Collection)
AddFromString
AddFromGUID
CreateEventProc
DeleteLines
InsertLine
InsertText
ReplaceLine
Remove (References Collection)
CAUSE
These methods automatically reset the database's Visual Basic for Applications project.
RESOLUTION
Move any variables that you do not want to be reset to an add-in or library
database. Add-ins and library databases have separate Visual Basic for
Applications projects; therefore, variables stored in them are not affected
when you use one of these methods.
REFERENCESFor more information about these methods, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type the name of the method in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
For more information about class modules, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type class modules, overview in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
For more information about library databases, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type library databases in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Modification Type: | Major | Last Reviewed: | 12/9/2002 |
---|
Keywords: | kbprb KB198637 |
---|
|