Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

This article was previously published under Q236545
Advanced: Requires expert coding, interoperability, and multiuser skills.

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


Resolution

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

↑ Back to the top


Status

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

↑ Back to the top


More information

Steps to Reproduce Behavior

1. Create a new Access database named db1.mdb.
2. In the new database, create a new module.
3.Type the following procedure in the module:
Sub testProc()
MsgBox "This is a test"
End Sub
					
4. Save and close the module. Name the module Module1.
5. 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.
6. 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.
7. Click the module to highlight it. On the Tools menu, point to SourceSafe, and then click Check Out.
8. 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.
9. Click the Module1 module to highlight it, and then click Design.
10. The Visual Basic Editor starts. Make no changes in the editor.
11. 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.
12. Click the Module1 module to highlight. Point to SourceSafe on the Tools menu, and then click Check In.
13. Return to the Visual Basic Editor. Note that the Module1 module is still open there.
14. 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
					
15. On the File menu, click Save db1, and then click Close and Return to Microsoft Access.
16. On the File menu, click Exit.
17. Re-open Db1.mdb, and then double-click the Module1 module.
18. When you are asked if you want to check out the module, click Yes. The Visual Basic Editor starts.
Note that the changes that you made to the module are not there.

↑ Back to the top


Keywords: KB236545, kbpending, kbbug

↑ Back to the top

Article Info
Article ID : 236545
Revision : 2
Created on : 7/16/2004
Published on : 7/16/2004
Exists online : False
Views : 377