Microsoft KB Archive/236545

= MOD2000: Changes That You Make to an Access Module After You Check It in to Visual Source Safe Are Lost =

Article ID: 236545

Article Last Modified on 7/16/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition
 * Microsoft Office 2000 Developer Edition

-



This article was previously published under Q236545



Advanced: Requires expert coding, interoperability, and multiuser skills.



SYMPTOMS
You can edit a Microsoft Visual Basic for Applications module after you check it in to Microsoft Visual Source Safe. However, changes that you make are not saved. Access does not warn you that your changes will be lost.



CAUSE
If you keep the Visual Basic Editor open after you check a module in to Visual Source Safe, you can make further changes to the module in the Visual Basic Editor. However, you are not making these changes to the module in Visual Source Safe because you did not check that module out again. Therefore, the changes that you make are lost.



RESOLUTION
To work around this behavior, make sure that you close the Visual Basic Editor before you check in your modules.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce Behavior
 Create a new Access database named db1.mdb. In the new database, create a new module.  Type the following procedure in the module: Sub testProc MsgBox "This is a test" End Sub  Save and close the module. Name the module Module1. On the Tools menu, point to SourceSafe, and then click Add Database to SourceSafe. Click Yes in the dialog box that tells you that the database is to be closed. Click OK in each dialog box. Accept all the defaults that Access gives. If you are asked to log in, enter a username, and click OK. When you are asked, click Yes to create the project.</li> After the database is added, you see an image of a lock next to the Module1 module. This indicates that the module is checked in.</li> Click the module to highlight it. On the Tools menu, point to SourceSafe, and then click Check Out.</li> In the Check Out Objects from SourceSafe dialog box, click Module1, and then click OK. A check mark appears next to the Module1 module. This indicates that the module is checked out.</li> Click the Module1 module to highlight it, and then click Design.</li> The Visual Basic Editor starts. Make no changes in the editor.</li> Leave the Visual Basic Editor open, and then return to Access. You can do so by clicking the Access button on the taskbar at the bottom of the screen.</li> Click the Module1 module to highlight. Point to SourceSafe on the Tools menu, and then click Check In.</li> Return to the Visual Basic Editor. Note that the Module1 module is still open there.</li>  Under the procedure that you added in Step 3, type the following new procedure: Sub testProc2 'This is test procedure2 MsgBox "This is a test that has a much longer sentence." End Sub </li> On the File menu, click Save db1, and then click Close and Return to Microsoft Access.</li> On the File menu, click Exit.</li> Re-open Db1.mdb, and then double-click the Module1 module.</li> When you are asked if you want to check out the module, click Yes. The Visual Basic Editor starts.</li></ol>

Note that the changes that you made to the module are not there.

Additional query words: pra gone can't see were not made what happened to

Keywords: kbbug kbpending KB236545

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.